275 lines
8.9 KiB
Go
275 lines
8.9 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 Phase1Status type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Phase1Status{}
|
|
|
|
/*
|
|
types and functions for dhGroup
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type Phase1StatusGetDhGroupAttributeType = *string
|
|
|
|
func getPhase1StatusGetDhGroupAttributeTypeOk(arg Phase1StatusGetDhGroupAttributeType) (ret Phase1StatusGetDhGroupRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhase1StatusGetDhGroupAttributeType(arg *Phase1StatusGetDhGroupAttributeType, val Phase1StatusGetDhGroupRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type Phase1StatusGetDhGroupArgType = string
|
|
type Phase1StatusGetDhGroupRetType = string
|
|
|
|
/*
|
|
types and functions for encryptionAlgorithm
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type Phase1StatusGetEncryptionAlgorithmAttributeType = *string
|
|
|
|
func getPhase1StatusGetEncryptionAlgorithmAttributeTypeOk(arg Phase1StatusGetEncryptionAlgorithmAttributeType) (ret Phase1StatusGetEncryptionAlgorithmRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhase1StatusGetEncryptionAlgorithmAttributeType(arg *Phase1StatusGetEncryptionAlgorithmAttributeType, val Phase1StatusGetEncryptionAlgorithmRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type Phase1StatusGetEncryptionAlgorithmArgType = string
|
|
type Phase1StatusGetEncryptionAlgorithmRetType = string
|
|
|
|
/*
|
|
types and functions for integrityAlgorithm
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type Phase1StatusGetIntegrityAlgorithmAttributeType = *string
|
|
|
|
func getPhase1StatusGetIntegrityAlgorithmAttributeTypeOk(arg Phase1StatusGetIntegrityAlgorithmAttributeType) (ret Phase1StatusGetIntegrityAlgorithmRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhase1StatusGetIntegrityAlgorithmAttributeType(arg *Phase1StatusGetIntegrityAlgorithmAttributeType, val Phase1StatusGetIntegrityAlgorithmRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type Phase1StatusGetIntegrityAlgorithmArgType = string
|
|
type Phase1StatusGetIntegrityAlgorithmRetType = string
|
|
|
|
/*
|
|
types and functions for state
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type Phase1StatusGetStateAttributeType = *string
|
|
|
|
func getPhase1StatusGetStateAttributeTypeOk(arg Phase1StatusGetStateAttributeType) (ret Phase1StatusGetStateRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPhase1StatusGetStateAttributeType(arg *Phase1StatusGetStateAttributeType, val Phase1StatusGetStateRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type Phase1StatusGetStateArgType = string
|
|
type Phase1StatusGetStateRetType = string
|
|
|
|
// Phase1Status struct for Phase1Status
|
|
type Phase1Status struct {
|
|
// Negotiated Diffie-Hellman Group
|
|
DhGroup Phase1StatusGetDhGroupAttributeType `json:"dhGroup,omitempty"`
|
|
// Negotiated encryption algorithm.
|
|
EncryptionAlgorithm Phase1StatusGetEncryptionAlgorithmAttributeType `json:"encryptionAlgorithm,omitempty"`
|
|
// Negotiated integrity algorithm or pseudo-random-function.
|
|
IntegrityAlgorithm Phase1StatusGetIntegrityAlgorithmAttributeType `json:"integrityAlgorithm,omitempty"`
|
|
State Phase1StatusGetStateAttributeType `json:"state,omitempty"`
|
|
}
|
|
|
|
// NewPhase1Status instantiates a new Phase1Status 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 NewPhase1Status() *Phase1Status {
|
|
this := Phase1Status{}
|
|
return &this
|
|
}
|
|
|
|
// NewPhase1StatusWithDefaults instantiates a new Phase1Status 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 NewPhase1StatusWithDefaults() *Phase1Status {
|
|
this := Phase1Status{}
|
|
return &this
|
|
}
|
|
|
|
// GetDhGroup returns the DhGroup field value if set, zero value otherwise.
|
|
func (o *Phase1Status) GetDhGroup() (res Phase1StatusGetDhGroupRetType) {
|
|
res, _ = o.GetDhGroupOk()
|
|
return
|
|
}
|
|
|
|
// GetDhGroupOk returns a tuple with the DhGroup field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase1Status) GetDhGroupOk() (ret Phase1StatusGetDhGroupRetType, ok bool) {
|
|
return getPhase1StatusGetDhGroupAttributeTypeOk(o.DhGroup)
|
|
}
|
|
|
|
// HasDhGroup returns a boolean if a field has been set.
|
|
func (o *Phase1Status) HasDhGroup() bool {
|
|
_, ok := o.GetDhGroupOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDhGroup gets a reference to the given string and assigns it to the DhGroup field.
|
|
func (o *Phase1Status) SetDhGroup(v Phase1StatusGetDhGroupRetType) {
|
|
setPhase1StatusGetDhGroupAttributeType(&o.DhGroup, v)
|
|
}
|
|
|
|
// GetEncryptionAlgorithm returns the EncryptionAlgorithm field value if set, zero value otherwise.
|
|
func (o *Phase1Status) GetEncryptionAlgorithm() (res Phase1StatusGetEncryptionAlgorithmRetType) {
|
|
res, _ = o.GetEncryptionAlgorithmOk()
|
|
return
|
|
}
|
|
|
|
// GetEncryptionAlgorithmOk returns a tuple with the EncryptionAlgorithm field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase1Status) GetEncryptionAlgorithmOk() (ret Phase1StatusGetEncryptionAlgorithmRetType, ok bool) {
|
|
return getPhase1StatusGetEncryptionAlgorithmAttributeTypeOk(o.EncryptionAlgorithm)
|
|
}
|
|
|
|
// HasEncryptionAlgorithm returns a boolean if a field has been set.
|
|
func (o *Phase1Status) HasEncryptionAlgorithm() bool {
|
|
_, ok := o.GetEncryptionAlgorithmOk()
|
|
return ok
|
|
}
|
|
|
|
// SetEncryptionAlgorithm gets a reference to the given string and assigns it to the EncryptionAlgorithm field.
|
|
func (o *Phase1Status) SetEncryptionAlgorithm(v Phase1StatusGetEncryptionAlgorithmRetType) {
|
|
setPhase1StatusGetEncryptionAlgorithmAttributeType(&o.EncryptionAlgorithm, v)
|
|
}
|
|
|
|
// GetIntegrityAlgorithm returns the IntegrityAlgorithm field value if set, zero value otherwise.
|
|
func (o *Phase1Status) GetIntegrityAlgorithm() (res Phase1StatusGetIntegrityAlgorithmRetType) {
|
|
res, _ = o.GetIntegrityAlgorithmOk()
|
|
return
|
|
}
|
|
|
|
// GetIntegrityAlgorithmOk returns a tuple with the IntegrityAlgorithm field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase1Status) GetIntegrityAlgorithmOk() (ret Phase1StatusGetIntegrityAlgorithmRetType, ok bool) {
|
|
return getPhase1StatusGetIntegrityAlgorithmAttributeTypeOk(o.IntegrityAlgorithm)
|
|
}
|
|
|
|
// HasIntegrityAlgorithm returns a boolean if a field has been set.
|
|
func (o *Phase1Status) HasIntegrityAlgorithm() bool {
|
|
_, ok := o.GetIntegrityAlgorithmOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIntegrityAlgorithm gets a reference to the given string and assigns it to the IntegrityAlgorithm field.
|
|
func (o *Phase1Status) SetIntegrityAlgorithm(v Phase1StatusGetIntegrityAlgorithmRetType) {
|
|
setPhase1StatusGetIntegrityAlgorithmAttributeType(&o.IntegrityAlgorithm, v)
|
|
}
|
|
|
|
// GetState returns the State field value if set, zero value otherwise.
|
|
func (o *Phase1Status) GetState() (res Phase1StatusGetStateRetType) {
|
|
res, _ = o.GetStateOk()
|
|
return
|
|
}
|
|
|
|
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Phase1Status) GetStateOk() (ret Phase1StatusGetStateRetType, ok bool) {
|
|
return getPhase1StatusGetStateAttributeTypeOk(o.State)
|
|
}
|
|
|
|
// HasState returns a boolean if a field has been set.
|
|
func (o *Phase1Status) HasState() bool {
|
|
_, ok := o.GetStateOk()
|
|
return ok
|
|
}
|
|
|
|
// SetState gets a reference to the given string and assigns it to the State field.
|
|
func (o *Phase1Status) SetState(v Phase1StatusGetStateRetType) {
|
|
setPhase1StatusGetStateAttributeType(&o.State, v)
|
|
}
|
|
|
|
func (o Phase1Status) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPhase1StatusGetDhGroupAttributeTypeOk(o.DhGroup); ok {
|
|
toSerialize["DhGroup"] = val
|
|
}
|
|
if val, ok := getPhase1StatusGetEncryptionAlgorithmAttributeTypeOk(o.EncryptionAlgorithm); ok {
|
|
toSerialize["EncryptionAlgorithm"] = val
|
|
}
|
|
if val, ok := getPhase1StatusGetIntegrityAlgorithmAttributeTypeOk(o.IntegrityAlgorithm); ok {
|
|
toSerialize["IntegrityAlgorithm"] = val
|
|
}
|
|
if val, ok := getPhase1StatusGetStateAttributeTypeOk(o.State); ok {
|
|
toSerialize["State"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePhase1Status struct {
|
|
value *Phase1Status
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePhase1Status) Get() *Phase1Status {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePhase1Status) Set(val *Phase1Status) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePhase1Status) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePhase1Status) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePhase1Status(val *Phase1Status) *NullablePhase1Status {
|
|
return &NullablePhase1Status{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePhase1Status) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePhase1Status) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|