terraform-provider-stackitp.../pkg/vpnalpha/model_phase.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## 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>
2026-01-29 14:10:25 +00:00

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)
}