## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
223 lines
7.5 KiB
Go
223 lines
7.5 KiB
Go
/*
|
|
STACKIT VPN API
|
|
|
|
The STACKIT VPN API provides endpoints to provision and manage VPN instances in your STACKIT project.
|
|
|
|
API version: 1alpha1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package vpnalpha
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the ConnectionStatusResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ConnectionStatusResponse{}
|
|
|
|
/*
|
|
types and functions for enabled
|
|
*/
|
|
|
|
// isBoolean
|
|
type ConnectionStatusResponsegetEnabledAttributeType = *bool
|
|
type ConnectionStatusResponsegetEnabledArgType = bool
|
|
type ConnectionStatusResponsegetEnabledRetType = bool
|
|
|
|
func getConnectionStatusResponsegetEnabledAttributeTypeOk(arg ConnectionStatusResponsegetEnabledAttributeType) (ret ConnectionStatusResponsegetEnabledRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setConnectionStatusResponsegetEnabledAttributeType(arg *ConnectionStatusResponsegetEnabledAttributeType, val ConnectionStatusResponsegetEnabledRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type ConnectionStatusResponseGetNameAttributeType = *string
|
|
|
|
func getConnectionStatusResponseGetNameAttributeTypeOk(arg ConnectionStatusResponseGetNameAttributeType) (ret ConnectionStatusResponseGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setConnectionStatusResponseGetNameAttributeType(arg *ConnectionStatusResponseGetNameAttributeType, val ConnectionStatusResponseGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type ConnectionStatusResponseGetNameArgType = string
|
|
type ConnectionStatusResponseGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for tunnels
|
|
*/
|
|
|
|
// isArray
|
|
type ConnectionStatusResponseGetTunnelsAttributeType = *[]TunnelStatus
|
|
type ConnectionStatusResponseGetTunnelsArgType = []TunnelStatus
|
|
type ConnectionStatusResponseGetTunnelsRetType = []TunnelStatus
|
|
|
|
func getConnectionStatusResponseGetTunnelsAttributeTypeOk(arg ConnectionStatusResponseGetTunnelsAttributeType) (ret ConnectionStatusResponseGetTunnelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setConnectionStatusResponseGetTunnelsAttributeType(arg *ConnectionStatusResponseGetTunnelsAttributeType, val ConnectionStatusResponseGetTunnelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// ConnectionStatusResponse struct for ConnectionStatusResponse
|
|
type ConnectionStatusResponse struct {
|
|
Enabled ConnectionStatusResponsegetEnabledAttributeType `json:"enabled,omitempty"`
|
|
// The name of the connection.
|
|
Name ConnectionStatusResponseGetNameAttributeType `json:"name,omitempty"`
|
|
Tunnels ConnectionStatusResponseGetTunnelsAttributeType `json:"tunnels,omitempty"`
|
|
}
|
|
|
|
// NewConnectionStatusResponse instantiates a new ConnectionStatusResponse object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewConnectionStatusResponse() *ConnectionStatusResponse {
|
|
this := ConnectionStatusResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewConnectionStatusResponseWithDefaults instantiates a new ConnectionStatusResponse object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewConnectionStatusResponseWithDefaults() *ConnectionStatusResponse {
|
|
this := ConnectionStatusResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *ConnectionStatusResponse) GetEnabled() (res ConnectionStatusResponsegetEnabledRetType) {
|
|
res, _ = o.GetEnabledOk()
|
|
return
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ConnectionStatusResponse) GetEnabledOk() (ret ConnectionStatusResponsegetEnabledRetType, ok bool) {
|
|
return getConnectionStatusResponsegetEnabledAttributeTypeOk(o.Enabled)
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *ConnectionStatusResponse) HasEnabled() bool {
|
|
_, ok := o.GetEnabledOk()
|
|
return ok
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
|
func (o *ConnectionStatusResponse) SetEnabled(v ConnectionStatusResponsegetEnabledRetType) {
|
|
setConnectionStatusResponsegetEnabledAttributeType(&o.Enabled, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ConnectionStatusResponse) GetName() (res ConnectionStatusResponseGetNameRetType) {
|
|
res, _ = o.GetNameOk()
|
|
return
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ConnectionStatusResponse) GetNameOk() (ret ConnectionStatusResponseGetNameRetType, ok bool) {
|
|
return getConnectionStatusResponseGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *ConnectionStatusResponse) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *ConnectionStatusResponse) SetName(v ConnectionStatusResponseGetNameRetType) {
|
|
setConnectionStatusResponseGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetTunnels returns the Tunnels field value if set, zero value otherwise.
|
|
func (o *ConnectionStatusResponse) GetTunnels() (res ConnectionStatusResponseGetTunnelsRetType) {
|
|
res, _ = o.GetTunnelsOk()
|
|
return
|
|
}
|
|
|
|
// GetTunnelsOk returns a tuple with the Tunnels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ConnectionStatusResponse) GetTunnelsOk() (ret ConnectionStatusResponseGetTunnelsRetType, ok bool) {
|
|
return getConnectionStatusResponseGetTunnelsAttributeTypeOk(o.Tunnels)
|
|
}
|
|
|
|
// HasTunnels returns a boolean if a field has been set.
|
|
func (o *ConnectionStatusResponse) HasTunnels() bool {
|
|
_, ok := o.GetTunnelsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetTunnels gets a reference to the given []TunnelStatus and assigns it to the Tunnels field.
|
|
func (o *ConnectionStatusResponse) SetTunnels(v ConnectionStatusResponseGetTunnelsRetType) {
|
|
setConnectionStatusResponseGetTunnelsAttributeType(&o.Tunnels, v)
|
|
}
|
|
|
|
func (o ConnectionStatusResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getConnectionStatusResponsegetEnabledAttributeTypeOk(o.Enabled); ok {
|
|
toSerialize["Enabled"] = val
|
|
}
|
|
if val, ok := getConnectionStatusResponseGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getConnectionStatusResponseGetTunnelsAttributeTypeOk(o.Tunnels); ok {
|
|
toSerialize["Tunnels"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableConnectionStatusResponse struct {
|
|
value *ConnectionStatusResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableConnectionStatusResponse) Get() *ConnectionStatusResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableConnectionStatusResponse) Set(val *ConnectionStatusResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableConnectionStatusResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableConnectionStatusResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableConnectionStatusResponse(val *ConnectionStatusResponse) *NullableConnectionStatusResponse {
|
|
return &NullableConnectionStatusResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableConnectionStatusResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableConnectionStatusResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|