diff --git a/services/vpn/oas_commit b/services/vpn/oas_commit index 739d7a10c..ae0e41a04 100644 --- a/services/vpn/oas_commit +++ b/services/vpn/oas_commit @@ -1 +1 @@ -d3401e53c9d91a6d95564111fc34bc9d341ef4e6 +1134de67a113f0123fcc121e5ac5e95e75d6b570 diff --git a/services/vpn/v1beta1api/model_asn_not.go b/services/vpn/v1beta1api/model_asn_not.go new file mode 100644 index 000000000..3e00d36a4 --- /dev/null +++ b/services/vpn/v1beta1api/model_asn_not.go @@ -0,0 +1,113 @@ +/* +STACKIT VPN API + +Provision and manage STACKIT VPN gateways. Use this API to establish secure, encrypted IPsec tunnels between your STACKIT Network Area (SNA) and external networks. The service supports the following routing architectures: - Policy-based IPsec - Static route-based IPsec - Dynamic BGP IPsec + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" + "fmt" +) + +// ASNNot the model 'ASNNot' +type ASNNot float32 + +// List of ASN_not +const ( + ASNNOT__23456 ASNNot = 23456 + ASNNOT__65535 ASNNot = 65535 + ASNNOT__unknown_default_open_api ASNNot = 11184809 +) + +// All allowed values of ASNNot enum +var AllowedASNNotEnumValues = []ASNNot{ + 23456, + 65535, + 11184809, +} + +func (v *ASNNot) UnmarshalJSON(src []byte) error { + var value float32 + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ASNNot(value) + for _, existing := range AllowedASNNotEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = ASNNOT__unknown_default_open_api + return nil +} + +// NewASNNotFromValue returns a pointer to a valid ASNNot +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewASNNotFromValue(v float32) (*ASNNot, error) { + ev := ASNNot(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ASNNot: valid values are %v", v, AllowedASNNotEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ASNNot) IsValid() bool { + for _, existing := range AllowedASNNotEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ASN_not value +func (v ASNNot) Ptr() *ASNNot { + return &v +} + +type NullableASNNot struct { + value *ASNNot + isSet bool +} + +func (v NullableASNNot) Get() *ASNNot { + return v.value +} + +func (v *NullableASNNot) Set(val *ASNNot) { + v.value = val + v.isSet = true +} + +func (v NullableASNNot) IsSet() bool { + return v.isSet +} + +func (v *NullableASNNot) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableASNNot(val *ASNNot) *NullableASNNot { + return &NullableASNNot{value: val, isSet: true} +} + +func (v NullableASNNot) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableASNNot) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/vpn/v1beta1api/model_bgp_tunnel_config.go b/services/vpn/v1beta1api/model_bgp_tunnel_config.go index 9cad9160f..3a1f31894 100644 --- a/services/vpn/v1beta1api/model_bgp_tunnel_config.go +++ b/services/vpn/v1beta1api/model_bgp_tunnel_config.go @@ -20,7 +20,7 @@ var _ MappedNullable = &BGPTunnelConfig{} // BGPTunnelConfig struct for BGPTunnelConfig type BGPTunnelConfig struct { - // ASN for private use (reserved by IANA), both 16Bit and 32Bit ranges are valid (RFC 6996). + // Number of an Autonomous System. Both 16Bit and 32Bit ranges are supported, excluding values reserved by: * RFC 7607 (0) * RFC 6793 (23456, AS_TRANS) * RFC 7300 (65535 and 4294967295, the \"Last ASNs\") RemoteAsn int64 `json:"remoteAsn"` AdditionalProperties map[string]interface{} }