216 lines
6.6 KiB
Go
216 lines
6.6 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 Phase type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Phase{}
|
|
|
|
/*
|
|
types and functions for dhGroups
|
|
*/
|
|
|
|
// isArray
|
|
type PhaseGetDhGroupsAttributeType = *[]string
|
|
type PhaseGetDhGroupsArgType = []string
|
|
type PhaseGetDhGroupsRetType = []string
|
|
|
|
func getPhaseGetDhGroupsAttributeTypeOk(arg PhaseGetDhGroupsAttributeType) (ret PhaseGetDhGroupsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhaseGetDhGroupsAttributeType(arg *PhaseGetDhGroupsAttributeType, val PhaseGetDhGroupsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for encryptionAlgorithms
|
|
*/
|
|
|
|
// isArray
|
|
type PhaseGetEncryptionAlgorithmsAttributeType = *[]string
|
|
type PhaseGetEncryptionAlgorithmsArgType = []string
|
|
type PhaseGetEncryptionAlgorithmsRetType = []string
|
|
|
|
func getPhaseGetEncryptionAlgorithmsAttributeTypeOk(arg PhaseGetEncryptionAlgorithmsAttributeType) (ret PhaseGetEncryptionAlgorithmsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhaseGetEncryptionAlgorithmsAttributeType(arg *PhaseGetEncryptionAlgorithmsAttributeType, val PhaseGetEncryptionAlgorithmsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for integrityAlgorithms
|
|
*/
|
|
|
|
// isArray
|
|
type PhaseGetIntegrityAlgorithmsAttributeType = *[]string
|
|
type PhaseGetIntegrityAlgorithmsArgType = []string
|
|
type PhaseGetIntegrityAlgorithmsRetType = []string
|
|
|
|
func getPhaseGetIntegrityAlgorithmsAttributeTypeOk(arg PhaseGetIntegrityAlgorithmsAttributeType) (ret PhaseGetIntegrityAlgorithmsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhaseGetIntegrityAlgorithmsAttributeType(arg *PhaseGetIntegrityAlgorithmsAttributeType, val PhaseGetIntegrityAlgorithmsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// Phase struct for Phase
|
|
type Phase struct {
|
|
// The Diffie-Hellman Group. Required, except if AEAD algorithms are selected.
|
|
DhGroups PhaseGetDhGroupsAttributeType `json:"dhGroups,omitempty"`
|
|
// REQUIRED
|
|
EncryptionAlgorithms PhaseGetEncryptionAlgorithmsAttributeType `json:"encryptionAlgorithms" required:"true"`
|
|
// REQUIRED
|
|
IntegrityAlgorithms PhaseGetIntegrityAlgorithmsAttributeType `json:"integrityAlgorithms" required:"true"`
|
|
}
|
|
|
|
type _Phase Phase
|
|
|
|
// NewPhase instantiates a new Phase 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 NewPhase(encryptionAlgorithms PhaseGetEncryptionAlgorithmsArgType, integrityAlgorithms PhaseGetIntegrityAlgorithmsArgType) *Phase {
|
|
this := Phase{}
|
|
setPhaseGetEncryptionAlgorithmsAttributeType(&this.EncryptionAlgorithms, encryptionAlgorithms)
|
|
setPhaseGetIntegrityAlgorithmsAttributeType(&this.IntegrityAlgorithms, integrityAlgorithms)
|
|
return &this
|
|
}
|
|
|
|
// NewPhaseWithDefaults instantiates a new Phase 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 NewPhaseWithDefaults() *Phase {
|
|
this := Phase{}
|
|
return &this
|
|
}
|
|
|
|
// GetDhGroups returns the DhGroups field value if set, zero value otherwise.
|
|
func (o *Phase) GetDhGroups() (res PhaseGetDhGroupsRetType) {
|
|
res, _ = o.GetDhGroupsOk()
|
|
return
|
|
}
|
|
|
|
// GetDhGroupsOk returns a tuple with the DhGroups field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase) GetDhGroupsOk() (ret PhaseGetDhGroupsRetType, ok bool) {
|
|
return getPhaseGetDhGroupsAttributeTypeOk(o.DhGroups)
|
|
}
|
|
|
|
// HasDhGroups returns a boolean if a field has been set.
|
|
func (o *Phase) HasDhGroups() bool {
|
|
_, ok := o.GetDhGroupsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDhGroups gets a reference to the given []string and assigns it to the DhGroups field.
|
|
func (o *Phase) SetDhGroups(v PhaseGetDhGroupsRetType) {
|
|
setPhaseGetDhGroupsAttributeType(&o.DhGroups, v)
|
|
}
|
|
|
|
// GetEncryptionAlgorithms returns the EncryptionAlgorithms field value
|
|
func (o *Phase) GetEncryptionAlgorithms() (ret PhaseGetEncryptionAlgorithmsRetType) {
|
|
ret, _ = o.GetEncryptionAlgorithmsOk()
|
|
return ret
|
|
}
|
|
|
|
// GetEncryptionAlgorithmsOk returns a tuple with the EncryptionAlgorithms field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase) GetEncryptionAlgorithmsOk() (ret PhaseGetEncryptionAlgorithmsRetType, ok bool) {
|
|
return getPhaseGetEncryptionAlgorithmsAttributeTypeOk(o.EncryptionAlgorithms)
|
|
}
|
|
|
|
// SetEncryptionAlgorithms sets field value
|
|
func (o *Phase) SetEncryptionAlgorithms(v PhaseGetEncryptionAlgorithmsRetType) {
|
|
setPhaseGetEncryptionAlgorithmsAttributeType(&o.EncryptionAlgorithms, v)
|
|
}
|
|
|
|
// GetIntegrityAlgorithms returns the IntegrityAlgorithms field value
|
|
func (o *Phase) GetIntegrityAlgorithms() (ret PhaseGetIntegrityAlgorithmsRetType) {
|
|
ret, _ = o.GetIntegrityAlgorithmsOk()
|
|
return ret
|
|
}
|
|
|
|
// GetIntegrityAlgorithmsOk returns a tuple with the IntegrityAlgorithms field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase) GetIntegrityAlgorithmsOk() (ret PhaseGetIntegrityAlgorithmsRetType, ok bool) {
|
|
return getPhaseGetIntegrityAlgorithmsAttributeTypeOk(o.IntegrityAlgorithms)
|
|
}
|
|
|
|
// SetIntegrityAlgorithms sets field value
|
|
func (o *Phase) SetIntegrityAlgorithms(v PhaseGetIntegrityAlgorithmsRetType) {
|
|
setPhaseGetIntegrityAlgorithmsAttributeType(&o.IntegrityAlgorithms, v)
|
|
}
|
|
|
|
func (o Phase) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPhaseGetDhGroupsAttributeTypeOk(o.DhGroups); ok {
|
|
toSerialize["DhGroups"] = val
|
|
}
|
|
if val, ok := getPhaseGetEncryptionAlgorithmsAttributeTypeOk(o.EncryptionAlgorithms); ok {
|
|
toSerialize["EncryptionAlgorithms"] = val
|
|
}
|
|
if val, ok := getPhaseGetIntegrityAlgorithmsAttributeTypeOk(o.IntegrityAlgorithms); ok {
|
|
toSerialize["IntegrityAlgorithms"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePhase struct {
|
|
value *Phase
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePhase) Get() *Phase {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePhase) Set(val *Phase) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePhase) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePhase) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePhase(val *Phase) *NullablePhase {
|
|
return &NullablePhase{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePhase) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePhase) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|