terraform-provider-stackitp.../pkg/vpnalpha/model_bgp_tunnel_config.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

225 lines
7.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 BGPTunnelConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BGPTunnelConfig{}
/*
types and functions for localBgpAddress
*/
// isNotNullableString
type BGPTunnelConfigGetLocalBgpAddressAttributeType = *string
func getBGPTunnelConfigGetLocalBgpAddressAttributeTypeOk(arg BGPTunnelConfigGetLocalBgpAddressAttributeType) (ret BGPTunnelConfigGetLocalBgpAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPTunnelConfigGetLocalBgpAddressAttributeType(arg *BGPTunnelConfigGetLocalBgpAddressAttributeType, val BGPTunnelConfigGetLocalBgpAddressRetType) {
*arg = &val
}
type BGPTunnelConfigGetLocalBgpAddressArgType = string
type BGPTunnelConfigGetLocalBgpAddressRetType = string
/*
types and functions for remoteAsn
*/
// isInteger
type BGPTunnelConfigGetRemoteAsnAttributeType = *int64
type BGPTunnelConfigGetRemoteAsnArgType = int64
type BGPTunnelConfigGetRemoteAsnRetType = int64
func getBGPTunnelConfigGetRemoteAsnAttributeTypeOk(arg BGPTunnelConfigGetRemoteAsnAttributeType) (ret BGPTunnelConfigGetRemoteAsnRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPTunnelConfigGetRemoteAsnAttributeType(arg *BGPTunnelConfigGetRemoteAsnAttributeType, val BGPTunnelConfigGetRemoteAsnRetType) {
*arg = &val
}
/*
types and functions for remoteBgpAddress
*/
// isNotNullableString
type BGPTunnelConfigGetRemoteBgpAddressAttributeType = *string
func getBGPTunnelConfigGetRemoteBgpAddressAttributeTypeOk(arg BGPTunnelConfigGetRemoteBgpAddressAttributeType) (ret BGPTunnelConfigGetRemoteBgpAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBGPTunnelConfigGetRemoteBgpAddressAttributeType(arg *BGPTunnelConfigGetRemoteBgpAddressAttributeType, val BGPTunnelConfigGetRemoteBgpAddressRetType) {
*arg = &val
}
type BGPTunnelConfigGetRemoteBgpAddressArgType = string
type BGPTunnelConfigGetRemoteBgpAddressRetType = string
// BGPTunnelConfig struct for BGPTunnelConfig
type BGPTunnelConfig struct {
LocalBgpAddress BGPTunnelConfigGetLocalBgpAddressAttributeType `json:"localBgpAddress,omitempty"`
// Remote ASN for Private Use (reserved by IANA) (required if enableBgp=true)
// Can be cast to int32 without loss of precision.
RemoteAsn BGPTunnelConfigGetRemoteAsnAttributeType `json:"remoteAsn,omitempty"`
RemoteBgpAddress BGPTunnelConfigGetRemoteBgpAddressAttributeType `json:"remoteBgpAddress,omitempty"`
}
// NewBGPTunnelConfig instantiates a new BGPTunnelConfig 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 NewBGPTunnelConfig() *BGPTunnelConfig {
this := BGPTunnelConfig{}
return &this
}
// NewBGPTunnelConfigWithDefaults instantiates a new BGPTunnelConfig 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 NewBGPTunnelConfigWithDefaults() *BGPTunnelConfig {
this := BGPTunnelConfig{}
return &this
}
// GetLocalBgpAddress returns the LocalBgpAddress field value if set, zero value otherwise.
func (o *BGPTunnelConfig) GetLocalBgpAddress() (res BGPTunnelConfigGetLocalBgpAddressRetType) {
res, _ = o.GetLocalBgpAddressOk()
return
}
// GetLocalBgpAddressOk returns a tuple with the LocalBgpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BGPTunnelConfig) GetLocalBgpAddressOk() (ret BGPTunnelConfigGetLocalBgpAddressRetType, ok bool) {
return getBGPTunnelConfigGetLocalBgpAddressAttributeTypeOk(o.LocalBgpAddress)
}
// HasLocalBgpAddress returns a boolean if a field has been set.
func (o *BGPTunnelConfig) HasLocalBgpAddress() bool {
_, ok := o.GetLocalBgpAddressOk()
return ok
}
// SetLocalBgpAddress gets a reference to the given string and assigns it to the LocalBgpAddress field.
func (o *BGPTunnelConfig) SetLocalBgpAddress(v BGPTunnelConfigGetLocalBgpAddressRetType) {
setBGPTunnelConfigGetLocalBgpAddressAttributeType(&o.LocalBgpAddress, v)
}
// GetRemoteAsn returns the RemoteAsn field value if set, zero value otherwise.
func (o *BGPTunnelConfig) GetRemoteAsn() (res BGPTunnelConfigGetRemoteAsnRetType) {
res, _ = o.GetRemoteAsnOk()
return
}
// GetRemoteAsnOk returns a tuple with the RemoteAsn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BGPTunnelConfig) GetRemoteAsnOk() (ret BGPTunnelConfigGetRemoteAsnRetType, ok bool) {
return getBGPTunnelConfigGetRemoteAsnAttributeTypeOk(o.RemoteAsn)
}
// HasRemoteAsn returns a boolean if a field has been set.
func (o *BGPTunnelConfig) HasRemoteAsn() bool {
_, ok := o.GetRemoteAsnOk()
return ok
}
// SetRemoteAsn gets a reference to the given int64 and assigns it to the RemoteAsn field.
func (o *BGPTunnelConfig) SetRemoteAsn(v BGPTunnelConfigGetRemoteAsnRetType) {
setBGPTunnelConfigGetRemoteAsnAttributeType(&o.RemoteAsn, v)
}
// GetRemoteBgpAddress returns the RemoteBgpAddress field value if set, zero value otherwise.
func (o *BGPTunnelConfig) GetRemoteBgpAddress() (res BGPTunnelConfigGetRemoteBgpAddressRetType) {
res, _ = o.GetRemoteBgpAddressOk()
return
}
// GetRemoteBgpAddressOk returns a tuple with the RemoteBgpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BGPTunnelConfig) GetRemoteBgpAddressOk() (ret BGPTunnelConfigGetRemoteBgpAddressRetType, ok bool) {
return getBGPTunnelConfigGetRemoteBgpAddressAttributeTypeOk(o.RemoteBgpAddress)
}
// HasRemoteBgpAddress returns a boolean if a field has been set.
func (o *BGPTunnelConfig) HasRemoteBgpAddress() bool {
_, ok := o.GetRemoteBgpAddressOk()
return ok
}
// SetRemoteBgpAddress gets a reference to the given string and assigns it to the RemoteBgpAddress field.
func (o *BGPTunnelConfig) SetRemoteBgpAddress(v BGPTunnelConfigGetRemoteBgpAddressRetType) {
setBGPTunnelConfigGetRemoteBgpAddressAttributeType(&o.RemoteBgpAddress, v)
}
func (o BGPTunnelConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getBGPTunnelConfigGetLocalBgpAddressAttributeTypeOk(o.LocalBgpAddress); ok {
toSerialize["LocalBgpAddress"] = val
}
if val, ok := getBGPTunnelConfigGetRemoteAsnAttributeTypeOk(o.RemoteAsn); ok {
toSerialize["RemoteAsn"] = val
}
if val, ok := getBGPTunnelConfigGetRemoteBgpAddressAttributeTypeOk(o.RemoteBgpAddress); ok {
toSerialize["RemoteBgpAddress"] = val
}
return toSerialize, nil
}
type NullableBGPTunnelConfig struct {
value *BGPTunnelConfig
isSet bool
}
func (v NullableBGPTunnelConfig) Get() *BGPTunnelConfig {
return v.value
}
func (v *NullableBGPTunnelConfig) Set(val *BGPTunnelConfig) {
v.value = val
v.isSet = true
}
func (v NullableBGPTunnelConfig) IsSet() bool {
return v.isSet
}
func (v *NullableBGPTunnelConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBGPTunnelConfig(val *BGPTunnelConfig) *NullableBGPTunnelConfig {
return &NullableBGPTunnelConfig{value: val, isSet: true}
}
func (v NullableBGPTunnelConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBGPTunnelConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}