diff --git a/services/edge/model_acl.go b/services/edge/model_acl.go new file mode 100644 index 000000000..f2bf3c895 --- /dev/null +++ b/services/edge/model_acl.go @@ -0,0 +1,151 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package edge + +import ( + "encoding/json" +) + +// checks if the Acl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Acl{} + +/* + types and functions for ipAllowList +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AclGetIpAllowListAttributeType = *[]IpAllowListEntry + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AclGetIpAllowListArgType = []IpAllowListEntry + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type AclGetIpAllowListRetType = []IpAllowListEntry + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getAclGetIpAllowListAttributeTypeOk(arg AclGetIpAllowListAttributeType) (ret AclGetIpAllowListRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setAclGetIpAllowListAttributeType(arg *AclGetIpAllowListAttributeType, val AclGetIpAllowListRetType) { + *arg = &val +} + +// Acl The ACL config for the instances API. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Acl struct { + IpAllowList AclGetIpAllowListAttributeType `json:"ipAllowList,omitempty"` +} + +// NewAcl instantiates a new Acl 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewAcl() *Acl { + this := Acl{} + return &this +} + +// NewAclWithDefaults instantiates a new Acl 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewAclWithDefaults() *Acl { + this := Acl{} + return &this +} + +// GetIpAllowList returns the IpAllowList field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Acl) GetIpAllowList() (res AclGetIpAllowListRetType) { + res, _ = o.GetIpAllowListOk() + return +} + +// GetIpAllowListOk returns a tuple with the IpAllowList field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Acl) GetIpAllowListOk() (ret AclGetIpAllowListRetType, ok bool) { + return getAclGetIpAllowListAttributeTypeOk(o.IpAllowList) +} + +// HasIpAllowList returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Acl) HasIpAllowList() bool { + _, ok := o.GetIpAllowListOk() + return ok +} + +// SetIpAllowList gets a reference to the given []IpAllowListEntry and assigns it to the IpAllowList field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Acl) SetIpAllowList(v AclGetIpAllowListRetType) { + setAclGetIpAllowListAttributeType(&o.IpAllowList, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Acl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getAclGetIpAllowListAttributeTypeOk(o.IpAllowList); ok { + toSerialize["IpAllowList"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableAcl struct { + value *Acl + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableAcl) Get() *Acl { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableAcl) Set(val *Acl) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableAcl) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableAcl) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableAcl(val *Acl) *NullableAcl { + return &NullableAcl{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableAcl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableAcl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/model_acl_test.go b/services/edge/model_acl_test.go new file mode 100644 index 000000000..43efce354 --- /dev/null +++ b/services/edge/model_acl_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package edge diff --git a/services/edge/model_instance.go b/services/edge/model_instance.go index ea235fcab..ba1895399 100644 --- a/services/edge/model_instance.go +++ b/services/edge/model_instance.go @@ -20,6 +20,33 @@ import ( // checks if the Instance type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Instance{} +/* + types and functions for acl +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceGetAclAttributeType = *Acl + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceGetAclArgType = Acl + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceGetAclRetType = Acl + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceGetAclAttributeTypeOk(arg InstanceGetAclAttributeType) (ret InstanceGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceGetAclAttributeType(arg *InstanceGetAclAttributeType, val InstanceGetAclRetType) { + *arg = &val +} + /* types and functions for created */ @@ -338,6 +365,7 @@ func setInstanceGetStatusAttributeType(arg *InstanceGetStatusAttributeType, val // Instance struct for Instance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Instance struct { + Acl InstanceGetAclAttributeType `json:"acl,omitempty"` // The date and time the creation of the instance was triggered. // REQUIRED Created InstanceGetCreatedAttributeType `json:"created" required:"true"` @@ -388,6 +416,33 @@ func NewInstanceWithDefaults() *Instance { return &this } +// GetAcl returns the Acl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Instance) GetAcl() (res InstanceGetAclRetType) { + res, _ = o.GetAclOk() + return +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Instance) GetAclOk() (ret InstanceGetAclRetType, ok bool) { + return getInstanceGetAclAttributeTypeOk(o.Acl) +} + +// HasAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Instance) HasAcl() bool { + _, ok := o.GetAclOk() + return ok +} + +// SetAcl gets a reference to the given Acl and assigns it to the Acl field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Instance) SetAcl(v InstanceGetAclRetType) { + setInstanceGetAclAttributeType(&o.Acl, v) +} + // GetCreated returns the Created field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetCreated() (ret InstanceGetCreatedRetType) { @@ -538,6 +593,9 @@ func (o *Instance) SetStatus(v InstanceGetStatusRetType) { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getInstanceGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } if val, ok := getInstanceGetCreatedAttributeTypeOk(o.Created); ok { toSerialize["Created"] = val } diff --git a/services/edge/model_ip_allow_list_entry.go b/services/edge/model_ip_allow_list_entry.go new file mode 100644 index 000000000..11c1ec313 --- /dev/null +++ b/services/edge/model_ip_allow_list_entry.go @@ -0,0 +1,382 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package edge + +import ( + "encoding/json" + "time" +) + +// checks if the IpAllowListEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IpAllowListEntry{} + +/* + types and functions for createdAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetCreatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getIpAllowListEntryGetCreatedAtAttributeTypeOk(arg IpAllowListEntryGetCreatedAtAttributeType) (ret IpAllowListEntryGetCreatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setIpAllowListEntryGetCreatedAtAttributeType(arg *IpAllowListEntryGetCreatedAtAttributeType, val IpAllowListEntryGetCreatedAtRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetDescriptionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getIpAllowListEntryGetDescriptionAttributeTypeOk(arg IpAllowListEntryGetDescriptionAttributeType) (ret IpAllowListEntryGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setIpAllowListEntryGetDescriptionAttributeType(arg *IpAllowListEntryGetDescriptionAttributeType, val IpAllowListEntryGetDescriptionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetDescriptionRetType = string + +/* + types and functions for ipRange +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetIpRangeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getIpAllowListEntryGetIpRangeAttributeTypeOk(arg IpAllowListEntryGetIpRangeAttributeType) (ret IpAllowListEntryGetIpRangeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setIpAllowListEntryGetIpRangeAttributeType(arg *IpAllowListEntryGetIpRangeAttributeType, val IpAllowListEntryGetIpRangeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetIpRangeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetIpRangeRetType = string + +/* + types and functions for updatedAt +*/ + +// isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetUpdatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetUpdatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetUpdatedAtRetType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getIpAllowListEntryGetUpdatedAtAttributeTypeOk(arg IpAllowListEntryGetUpdatedAtAttributeType) (ret IpAllowListEntryGetUpdatedAtRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setIpAllowListEntryGetUpdatedAtAttributeType(arg *IpAllowListEntryGetUpdatedAtAttributeType, val IpAllowListEntryGetUpdatedAtRetType) { + *arg = &val +} + +/* + types and functions for uuid +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetUuidAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getIpAllowListEntryGetUuidAttributeTypeOk(arg IpAllowListEntryGetUuidAttributeType) (ret IpAllowListEntryGetUuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setIpAllowListEntryGetUuidAttributeType(arg *IpAllowListEntryGetUuidAttributeType, val IpAllowListEntryGetUuidRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetUuidArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntryGetUuidRetType = string + +// IpAllowListEntry struct for IpAllowListEntry +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type IpAllowListEntry struct { + // ISO-8601 timestamp of when the entry was created. + CreatedAt IpAllowListEntryGetCreatedAtAttributeType `json:"createdAt,omitempty"` + // Some description of the entry. + Description IpAllowListEntryGetDescriptionAttributeType `json:"description,omitempty"` + // The IP CIDR range for the ACL entry. + // REQUIRED + IpRange IpAllowListEntryGetIpRangeAttributeType `json:"ipRange" required:"true"` + // ISO-8601 timestamp of when the entry was last updated. + UpdatedAt IpAllowListEntryGetUpdatedAtAttributeType `json:"updatedAt,omitempty"` + // The unique identifier for the ipAllowListEntry entry. This value is immutable, used to identify entries for updates, and cannot be changed after creation. + // REQUIRED + Uuid IpAllowListEntryGetUuidAttributeType `json:"uuid" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _IpAllowListEntry IpAllowListEntry + +// NewIpAllowListEntry instantiates a new IpAllowListEntry 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewIpAllowListEntry(ipRange IpAllowListEntryGetIpRangeArgType, uuid IpAllowListEntryGetUuidArgType) *IpAllowListEntry { + this := IpAllowListEntry{} + setIpAllowListEntryGetIpRangeAttributeType(&this.IpRange, ipRange) + setIpAllowListEntryGetUuidAttributeType(&this.Uuid, uuid) + return &this +} + +// NewIpAllowListEntryWithDefaults instantiates a new IpAllowListEntry 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewIpAllowListEntryWithDefaults() *IpAllowListEntry { + this := IpAllowListEntry{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetCreatedAt() (res IpAllowListEntryGetCreatedAtRetType) { + res, _ = o.GetCreatedAtOk() + return +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetCreatedAtOk() (ret IpAllowListEntryGetCreatedAtRetType, ok bool) { + return getIpAllowListEntryGetCreatedAtAttributeTypeOk(o.CreatedAt) +} + +// HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) HasCreatedAt() bool { + _, ok := o.GetCreatedAtOk() + return ok +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) SetCreatedAt(v IpAllowListEntryGetCreatedAtRetType) { + setIpAllowListEntryGetCreatedAtAttributeType(&o.CreatedAt, v) +} + +// GetDescription returns the Description field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetDescription() (res IpAllowListEntryGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetDescriptionOk() (ret IpAllowListEntryGetDescriptionRetType, ok bool) { + return getIpAllowListEntryGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) SetDescription(v IpAllowListEntryGetDescriptionRetType) { + setIpAllowListEntryGetDescriptionAttributeType(&o.Description, v) +} + +// GetIpRange returns the IpRange field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetIpRange() (ret IpAllowListEntryGetIpRangeRetType) { + ret, _ = o.GetIpRangeOk() + return ret +} + +// GetIpRangeOk returns a tuple with the IpRange field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetIpRangeOk() (ret IpAllowListEntryGetIpRangeRetType, ok bool) { + return getIpAllowListEntryGetIpRangeAttributeTypeOk(o.IpRange) +} + +// SetIpRange sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) SetIpRange(v IpAllowListEntryGetIpRangeRetType) { + setIpAllowListEntryGetIpRangeAttributeType(&o.IpRange, v) +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetUpdatedAt() (res IpAllowListEntryGetUpdatedAtRetType) { + res, _ = o.GetUpdatedAtOk() + return +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetUpdatedAtOk() (ret IpAllowListEntryGetUpdatedAtRetType, ok bool) { + return getIpAllowListEntryGetUpdatedAtAttributeTypeOk(o.UpdatedAt) +} + +// HasUpdatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) HasUpdatedAt() bool { + _, ok := o.GetUpdatedAtOk() + return ok +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) SetUpdatedAt(v IpAllowListEntryGetUpdatedAtRetType) { + setIpAllowListEntryGetUpdatedAtAttributeType(&o.UpdatedAt, v) +} + +// GetUuid returns the Uuid field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetUuid() (ret IpAllowListEntryGetUuidRetType) { + ret, _ = o.GetUuidOk() + return ret +} + +// GetUuidOk returns a tuple with the Uuid field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) GetUuidOk() (ret IpAllowListEntryGetUuidRetType, ok bool) { + return getIpAllowListEntryGetUuidAttributeTypeOk(o.Uuid) +} + +// SetUuid sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *IpAllowListEntry) SetUuid(v IpAllowListEntryGetUuidRetType) { + setIpAllowListEntryGetUuidAttributeType(&o.Uuid, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o IpAllowListEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getIpAllowListEntryGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { + toSerialize["CreatedAt"] = val + } + if val, ok := getIpAllowListEntryGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getIpAllowListEntryGetIpRangeAttributeTypeOk(o.IpRange); ok { + toSerialize["IpRange"] = val + } + if val, ok := getIpAllowListEntryGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { + toSerialize["UpdatedAt"] = val + } + if val, ok := getIpAllowListEntryGetUuidAttributeTypeOk(o.Uuid); ok { + toSerialize["Uuid"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableIpAllowListEntry struct { + value *IpAllowListEntry + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableIpAllowListEntry) Get() *IpAllowListEntry { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableIpAllowListEntry) Set(val *IpAllowListEntry) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableIpAllowListEntry) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableIpAllowListEntry) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableIpAllowListEntry(val *IpAllowListEntry) *NullableIpAllowListEntry { + return &NullableIpAllowListEntry{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableIpAllowListEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableIpAllowListEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/model_ip_allow_list_entry_test.go b/services/edge/model_ip_allow_list_entry_test.go new file mode 100644 index 000000000..43efce354 --- /dev/null +++ b/services/edge/model_ip_allow_list_entry_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package edge diff --git a/services/edge/oas_commit b/services/edge/oas_commit index b129c2291..764ea55f1 100644 --- a/services/edge/oas_commit +++ b/services/edge/oas_commit @@ -1 +1 @@ -98c11e0ee4834ddaaa474eccc437d234e6276a70 +8fcf792fbef3e409c27d322e4793a04f005200fb diff --git a/services/edge/v1beta1api/model_acl.go b/services/edge/v1beta1api/model_acl.go new file mode 100644 index 000000000..bd718e29e --- /dev/null +++ b/services/edge/v1beta1api/model_acl.go @@ -0,0 +1,153 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" +) + +// checks if the Acl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Acl{} + +// Acl The ACL config for the instances API. +type Acl struct { + IpAllowList []IpAllowListEntry `json:"ipAllowList,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Acl Acl + +// NewAcl instantiates a new Acl 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 NewAcl() *Acl { + this := Acl{} + return &this +} + +// NewAclWithDefaults instantiates a new Acl 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 NewAclWithDefaults() *Acl { + this := Acl{} + return &this +} + +// GetIpAllowList returns the IpAllowList field value if set, zero value otherwise. +func (o *Acl) GetIpAllowList() []IpAllowListEntry { + if o == nil || IsNil(o.IpAllowList) { + var ret []IpAllowListEntry + return ret + } + return o.IpAllowList +} + +// GetIpAllowListOk returns a tuple with the IpAllowList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Acl) GetIpAllowListOk() ([]IpAllowListEntry, bool) { + if o == nil || IsNil(o.IpAllowList) { + return nil, false + } + return o.IpAllowList, true +} + +// HasIpAllowList returns a boolean if a field has been set. +func (o *Acl) HasIpAllowList() bool { + if o != nil && !IsNil(o.IpAllowList) { + return true + } + + return false +} + +// SetIpAllowList gets a reference to the given []IpAllowListEntry and assigns it to the IpAllowList field. +func (o *Acl) SetIpAllowList(v []IpAllowListEntry) { + o.IpAllowList = v +} + +func (o Acl) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Acl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IpAllowList) { + toSerialize["ipAllowList"] = o.IpAllowList + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Acl) UnmarshalJSON(data []byte) (err error) { + varAcl := _Acl{} + + err = json.Unmarshal(data, &varAcl) + + if err != nil { + return err + } + + *o = Acl(varAcl) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "ipAllowList") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAcl struct { + value *Acl + isSet bool +} + +func (v NullableAcl) Get() *Acl { + return v.value +} + +func (v *NullableAcl) Set(val *Acl) { + v.value = val + v.isSet = true +} + +func (v NullableAcl) IsSet() bool { + return v.isSet +} + +func (v *NullableAcl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAcl(val *Acl) *NullableAcl { + return &NullableAcl{value: val, isSet: true} +} + +func (v NullableAcl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAcl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/edge/v1beta1api/model_instance.go b/services/edge/v1beta1api/model_instance.go index be11be782..c018e6f9a 100644 --- a/services/edge/v1beta1api/model_instance.go +++ b/services/edge/v1beta1api/model_instance.go @@ -21,6 +21,7 @@ var _ MappedNullable = &Instance{} // Instance struct for Instance type Instance struct { + Acl *Acl `json:"acl,omitempty"` // The date and time the creation of the instance was triggered. Created time.Time `json:"created"` // A user chosen description to distinguish multiple instances. @@ -62,6 +63,38 @@ func NewInstanceWithDefaults() *Instance { return &this } +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Instance) GetAcl() Acl { + if o == nil || IsNil(o.Acl) { + var ret Acl + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetAclOk() (*Acl, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Instance) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given Acl and assigns it to the Acl field. +func (o *Instance) SetAcl(v Acl) { + o.Acl = &v +} + // GetCreated returns the Created field value func (o *Instance) GetCreated() time.Time { if o == nil { @@ -248,6 +281,9 @@ func (o Instance) MarshalJSON() ([]byte, error) { func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } toSerialize["created"] = o.Created if !IsNil(o.Description) { toSerialize["description"] = o.Description @@ -305,6 +341,7 @@ func (o *Instance) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "acl") delete(additionalProperties, "created") delete(additionalProperties, "description") delete(additionalProperties, "displayName") diff --git a/services/edge/v1beta1api/model_ip_allow_list_entry.go b/services/edge/v1beta1api/model_ip_allow_list_entry.go new file mode 100644 index 000000000..865bfac90 --- /dev/null +++ b/services/edge/v1beta1api/model_ip_allow_list_entry.go @@ -0,0 +1,312 @@ +/* +STACKIT Edge Cloud API + +This API provides endpoints for managing STACKIT Edge Cloud instances. + +API version: 1beta1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1beta1api + +import ( + "encoding/json" + "fmt" + "time" +) + +// checks if the IpAllowListEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IpAllowListEntry{} + +// IpAllowListEntry struct for IpAllowListEntry +type IpAllowListEntry struct { + // ISO-8601 timestamp of when the entry was created. + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Some description of the entry. + Description *string `json:"description,omitempty"` + // The IP CIDR range for the ACL entry. + IpRange string `json:"ipRange"` + // ISO-8601 timestamp of when the entry was last updated. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + // The unique identifier for the ipAllowListEntry entry. This value is immutable, used to identify entries for updates, and cannot be changed after creation. + Uuid string `json:"uuid"` + AdditionalProperties map[string]interface{} +} + +type _IpAllowListEntry IpAllowListEntry + +// NewIpAllowListEntry instantiates a new IpAllowListEntry 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 NewIpAllowListEntry(ipRange string, uuid string) *IpAllowListEntry { + this := IpAllowListEntry{} + this.IpRange = ipRange + this.Uuid = uuid + return &this +} + +// NewIpAllowListEntryWithDefaults instantiates a new IpAllowListEntry 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 NewIpAllowListEntryWithDefaults() *IpAllowListEntry { + this := IpAllowListEntry{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *IpAllowListEntry) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IpAllowListEntry) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *IpAllowListEntry) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *IpAllowListEntry) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *IpAllowListEntry) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IpAllowListEntry) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *IpAllowListEntry) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *IpAllowListEntry) SetDescription(v string) { + o.Description = &v +} + +// GetIpRange returns the IpRange field value +func (o *IpAllowListEntry) GetIpRange() string { + if o == nil { + var ret string + return ret + } + + return o.IpRange +} + +// GetIpRangeOk returns a tuple with the IpRange field value +// and a boolean to check if the value has been set. +func (o *IpAllowListEntry) GetIpRangeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.IpRange, true +} + +// SetIpRange sets field value +func (o *IpAllowListEntry) SetIpRange(v string) { + o.IpRange = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *IpAllowListEntry) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IpAllowListEntry) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *IpAllowListEntry) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *IpAllowListEntry) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetUuid returns the Uuid field value +func (o *IpAllowListEntry) GetUuid() string { + if o == nil { + var ret string + return ret + } + + return o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value +// and a boolean to check if the value has been set. +func (o *IpAllowListEntry) GetUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uuid, true +} + +// SetUuid sets field value +func (o *IpAllowListEntry) SetUuid(v string) { + o.Uuid = v +} + +func (o IpAllowListEntry) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IpAllowListEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["ipRange"] = o.IpRange + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + toSerialize["uuid"] = o.Uuid + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *IpAllowListEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ipRange", + "uuid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpAllowListEntry := _IpAllowListEntry{} + + err = json.Unmarshal(data, &varIpAllowListEntry) + + if err != nil { + return err + } + + *o = IpAllowListEntry(varIpAllowListEntry) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "createdAt") + delete(additionalProperties, "description") + delete(additionalProperties, "ipRange") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "uuid") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableIpAllowListEntry struct { + value *IpAllowListEntry + isSet bool +} + +func (v NullableIpAllowListEntry) Get() *IpAllowListEntry { + return v.value +} + +func (v *NullableIpAllowListEntry) Set(val *IpAllowListEntry) { + v.value = val + v.isSet = true +} + +func (v NullableIpAllowListEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableIpAllowListEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIpAllowListEntry(val *IpAllowListEntry) *NullableIpAllowListEntry { + return &NullableIpAllowListEntry{value: val, isSet: true} +} + +func (v NullableIpAllowListEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIpAllowListEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}