From 29979b288b9861400fbce8bbcd679a31d81362dd Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 7 Aug 2026 08:52:02 +0000 Subject: [PATCH] Generate iaas --- services/iaas/go.mod | 2 +- services/iaas/go.sum | 4 +- services/iaas/model_create_server_payload.go | 58 --- services/iaas/model_server.go | 58 --- services/iaas/model_server_vtpm.go | 152 ------- services/iaas/model_server_vtpm_test.go | 11 - services/iaas/oas_commit | 2 +- services/iaas/v1api/client.go | 9 + services/iaas/v1api/model_affinity_group.go | 2 +- .../v1api/model_allowed_addresses_inner.go | 6 +- services/iaas/v1api/model_area.go | 2 +- services/iaas/v1api/model_area_config.go | 2 +- services/iaas/v1api/model_area_id.go | 19 +- services/iaas/v1api/model_backup.go | 2 +- .../v1api/model_base_security_group_rule.go | 2 +- services/iaas/v1api/model_boot_volume.go | 2 +- .../model_create_affinity_group_payload.go | 2 +- services/iaas/v1api/model_create_area_ipv4.go | 2 +- .../iaas/v1api/model_create_backup_payload.go | 2 +- .../iaas/v1api/model_create_image_payload.go | 2 +- .../v1api/model_create_key_pair_payload.go | 2 +- .../model_create_network_area_payload.go | 2 +- .../v1api/model_create_network_ipv4_body.go | 4 +- .../v1api/model_create_network_ipv6_body.go | 4 +- .../v1api/model_create_network_payload.go | 2 +- .../iaas/v1api/model_create_nic_payload.go | 6 +- services/iaas/v1api/model_create_protocol.go | 11 +- .../v1api/model_create_public_ip_payload.go | 2 +- .../model_create_security_group_payload.go | 2 +- ...odel_create_security_group_rule_payload.go | 2 +- .../iaas/v1api/model_create_server_payload.go | 43 +- .../model_create_server_payload_networking.go | 11 +- .../v1api/model_create_snapshot_payload.go | 2 +- .../iaas/v1api/model_create_volume_payload.go | 4 +- services/iaas/v1api/model_image.go | 2 +- services/iaas/v1api/model_keypair.go | 2 +- services/iaas/v1api/model_machine_type.go | 2 +- services/iaas/v1api/model_network.go | 6 +- .../iaas/v1api/model_network_area_ipv4.go | 2 +- services/iaas/v1api/model_network_range.go | 2 +- services/iaas/v1api/model_nic.go | 6 +- ...del_partial_update_network_area_payload.go | 2 +- .../model_partial_update_network_payload.go | 2 +- services/iaas/v1api/model_public_ip.go | 2 +- services/iaas/v1api/model_public_network.go | 2 +- .../iaas/v1api/model_resize_server_payload.go | 2 +- services/iaas/v1api/model_route.go | 4 +- services/iaas/v1api/model_security_group.go | 2 +- .../iaas/v1api/model_security_group_rule.go | 2 +- services/iaas/v1api/model_server.go | 43 +- services/iaas/v1api/model_server_network.go | 8 +- .../iaas/v1api/model_server_networking.go | 11 +- services/iaas/v1api/model_server_vtpm.go | 170 -------- services/iaas/v1api/model_snapshot.go | 2 +- .../iaas/v1api/model_update_backup_payload.go | 2 +- .../iaas/v1api/model_update_image_payload.go | 2 +- .../v1api/model_update_network_ipv4_body.go | 2 +- .../v1api/model_update_network_ipv6_body.go | 2 +- .../iaas/v1api/model_update_nic_payload.go | 2 +- .../v1api/model_update_public_ip_payload.go | 2 +- .../model_update_security_group_payload.go | 2 +- .../iaas/v1api/model_update_server_payload.go | 2 +- .../v1api/model_update_snapshot_payload.go | 2 +- .../iaas/v1api/model_update_volume_payload.go | 2 +- services/iaas/v1api/model_volume.go | 4 +- .../model_volume_encryption_parameter.go | 2 +- .../v1api/model_volume_performance_class.go | 2 +- services/iaas/v2alpha1api/client.go | 9 + ...model_add_routing_table_to_area_payload.go | 2 +- .../model_add_vpc_routing_table_payload.go | 2 +- .../v2alpha1api/model_create_network_ipv4.go | 11 +- .../model_create_network_ipv4_with_prefix.go | 4 +- .../v2alpha1api/model_create_network_ipv6.go | 11 +- .../model_create_network_ipv6_with_prefix.go | 4 +- .../model_create_network_payload.go | 2 +- .../model_create_vpc_network_range_payload.go | 407 ++---------------- .../v2alpha1api/model_create_vpc_payload.go | 2 +- .../v2alpha1api/model_destination_cidrv4.go | 2 +- .../v2alpha1api/model_destination_cidrv6.go | 2 +- .../iaas/v2alpha1api/model_network_ipv4.go | 4 +- .../iaas/v2alpha1api/model_network_ipv6.go | 2 +- .../model_network_range_ipv4_request.go | 2 +- .../iaas/v2alpha1api/model_nexthop_ipv4.go | 2 +- .../iaas/v2alpha1api/model_nexthop_ipv6.go | 2 +- .../model_partial_update_network_payload.go | 2 +- .../model_partial_update_vpc_payload.go | 2 +- .../iaas/v2alpha1api/model_routing_table.go | 2 +- .../model_update_network_ipv4_body.go | 2 +- .../model_update_network_ipv6_body.go | 2 +- ...el_update_routing_table_of_area_payload.go | 2 +- .../model_update_vpc_network_range_payload.go | 365 ++-------------- .../model_update_vpc_routing_table_payload.go | 2 +- services/iaas/v2alpha1api/model_vpc.go | 2 +- .../model_vpc_network_range_ipv4.go | 2 +- .../model_vpc_network_range_ipv6.go | 2 +- .../v2alpha1api/model_vpc_routing_table.go | 2 +- services/iaas/v2api/client.go | 9 + ...model_add_routing_table_to_area_payload.go | 2 +- services/iaas/v2api/model_affinity_group.go | 2 +- .../v2api/model_allowed_addresses_inner.go | 6 +- services/iaas/v2api/model_area_id.go | 19 +- services/iaas/v2api/model_backup.go | 2 +- .../v2api/model_base_security_group_rule.go | 2 +- services/iaas/v2api/model_boot_volume.go | 2 +- .../model_create_affinity_group_payload.go | 2 +- .../iaas/v2api/model_create_backup_payload.go | 2 +- .../iaas/v2api/model_create_image_payload.go | 2 +- .../model_create_isolated_network_payload.go | 2 +- .../v2api/model_create_key_pair_payload.go | 2 +- .../iaas/v2api/model_create_network_ipv4.go | 11 +- .../model_create_network_ipv4_with_prefix.go | 4 +- .../iaas/v2api/model_create_network_ipv6.go | 11 +- .../model_create_network_ipv6_with_prefix.go | 4 +- .../v2api/model_create_network_payload.go | 2 +- .../iaas/v2api/model_create_nic_payload.go | 6 +- services/iaas/v2api/model_create_protocol.go | 11 +- .../v2api/model_create_public_ip_payload.go | 2 +- .../model_create_security_group_payload.go | 2 +- ...odel_create_security_group_rule_payload.go | 2 +- .../iaas/v2api/model_create_server_payload.go | 43 +- ...create_server_payload_all_of_networking.go | 11 +- .../v2api/model_create_snapshot_payload.go | 2 +- .../iaas/v2api/model_create_volume_payload.go | 4 +- .../iaas/v2api/model_destination_cidrv4.go | 2 +- .../iaas/v2api/model_destination_cidrv6.go | 2 +- services/iaas/v2api/model_image.go | 2 +- .../v2api/model_image_from_volume_payload.go | 2 +- services/iaas/v2api/model_keypair.go | 2 +- services/iaas/v2api/model_machine_type.go | 2 +- services/iaas/v2api/model_network_ipv4.go | 4 +- services/iaas/v2api/model_network_ipv6.go | 2 +- services/iaas/v2api/model_network_range.go | 2 +- services/iaas/v2api/model_nexthop_ipv4.go | 2 +- services/iaas/v2api/model_nexthop_ipv6.go | 2 +- services/iaas/v2api/model_nic.go | 6 +- .../model_partial_update_network_payload.go | 2 +- services/iaas/v2api/model_public_ip.go | 2 +- services/iaas/v2api/model_public_network.go | 2 +- .../iaas/v2api/model_regional_area_ipv4.go | 2 +- .../iaas/v2api/model_resize_server_payload.go | 2 +- services/iaas/v2api/model_routing_table.go | 2 +- services/iaas/v2api/model_security_group.go | 2 +- .../iaas/v2api/model_security_group_rule.go | 2 +- services/iaas/v2api/model_server.go | 43 +- services/iaas/v2api/model_server_network.go | 8 +- .../iaas/v2api/model_server_networking.go | 11 +- services/iaas/v2api/model_server_vtpm.go | 170 -------- services/iaas/v2api/model_snapshot.go | 2 +- .../iaas/v2api/model_update_backup_payload.go | 2 +- .../iaas/v2api/model_update_image_payload.go | 2 +- .../v2api/model_update_network_ipv4_body.go | 2 +- .../v2api/model_update_network_ipv6_body.go | 2 +- .../iaas/v2api/model_update_nic_payload.go | 2 +- .../v2api/model_update_public_ip_payload.go | 2 +- ...el_update_routing_table_of_area_payload.go | 2 +- .../model_update_security_group_payload.go | 2 +- .../iaas/v2api/model_update_server_payload.go | 2 +- .../v2api/model_update_snapshot_payload.go | 2 +- .../iaas/v2api/model_update_volume_payload.go | 2 +- services/iaas/v2api/model_volume.go | 4 +- .../model_volume_encryption_parameter.go | 2 +- .../v2api/model_volume_performance_class.go | 2 +- services/iaas/v2beta1api/client.go | 9 + ...model_add_routing_table_to_area_payload.go | 2 +- .../iaas/v2beta1api/model_affinity_group.go | 2 +- .../model_allowed_addresses_inner.go | 6 +- services/iaas/v2beta1api/model_area_id.go | 19 +- services/iaas/v2beta1api/model_backup.go | 2 +- .../model_base_security_group_rule.go | 2 +- services/iaas/v2beta1api/model_boot_volume.go | 2 +- .../model_create_affinity_group_payload.go | 2 +- .../v2beta1api/model_create_backup_payload.go | 2 +- .../v2beta1api/model_create_image_payload.go | 2 +- .../model_create_isolated_network_payload.go | 2 +- .../model_create_key_pair_payload.go | 2 +- .../v2beta1api/model_create_network_ipv4.go | 11 +- .../model_create_network_ipv4_with_prefix.go | 4 +- .../v2beta1api/model_create_network_ipv6.go | 11 +- .../model_create_network_ipv6_with_prefix.go | 4 +- .../model_create_network_payload.go | 2 +- .../v2beta1api/model_create_nic_payload.go | 6 +- .../iaas/v2beta1api/model_create_protocol.go | 11 +- .../model_create_public_ip_payload.go | 2 +- .../model_create_security_group_payload.go | 2 +- ...odel_create_security_group_rule_payload.go | 2 +- .../v2beta1api/model_create_server_payload.go | 43 +- ...create_server_payload_all_of_networking.go | 11 +- .../v2beta1api/model_create_volume_payload.go | 4 +- .../v2beta1api/model_destination_cidrv4.go | 2 +- .../v2beta1api/model_destination_cidrv6.go | 2 +- services/iaas/v2beta1api/model_image.go | 2 +- services/iaas/v2beta1api/model_keypair.go | 2 +- .../iaas/v2beta1api/model_machine_type.go | 2 +- .../iaas/v2beta1api/model_network_ipv4.go | 4 +- .../iaas/v2beta1api/model_network_ipv6.go | 2 +- .../iaas/v2beta1api/model_network_range.go | 2 +- .../iaas/v2beta1api/model_nexthop_ipv4.go | 2 +- .../iaas/v2beta1api/model_nexthop_ipv6.go | 2 +- services/iaas/v2beta1api/model_nic.go | 6 +- .../model_partial_update_network_payload.go | 2 +- services/iaas/v2beta1api/model_public_ip.go | 2 +- .../iaas/v2beta1api/model_public_network.go | 2 +- .../v2beta1api/model_regional_area_ipv4.go | 2 +- .../v2beta1api/model_resize_server_payload.go | 2 +- .../iaas/v2beta1api/model_routing_table.go | 2 +- .../iaas/v2beta1api/model_security_group.go | 2 +- .../v2beta1api/model_security_group_rule.go | 2 +- services/iaas/v2beta1api/model_server.go | 43 +- .../iaas/v2beta1api/model_server_network.go | 8 +- .../v2beta1api/model_server_networking.go | 11 +- services/iaas/v2beta1api/model_server_vtpm.go | 170 -------- services/iaas/v2beta1api/model_snapshot.go | 2 +- .../v2beta1api/model_update_image_payload.go | 2 +- .../model_update_network_ipv4_body.go | 2 +- .../model_update_network_ipv6_body.go | 2 +- .../v2beta1api/model_update_nic_payload.go | 2 +- .../model_update_public_ip_payload.go | 2 +- ...el_update_routing_table_of_area_payload.go | 2 +- .../v2beta1api/model_update_server_payload.go | 2 +- .../v2beta1api/model_update_volume_payload.go | 2 +- .../model_v2beta1_create_snapshot_payload.go | 2 +- .../model_v2beta1_update_backup_payload.go | 2 +- ...l_v2beta1_update_security_group_payload.go | 2 +- .../model_v2beta1_update_snapshot_payload.go | 2 +- services/iaas/v2beta1api/model_volume.go | 4 +- .../model_volume_encryption_parameter.go | 2 +- .../model_volume_performance_class.go | 2 +- 227 files changed, 582 insertions(+), 1971 deletions(-) delete mode 100644 services/iaas/model_server_vtpm.go delete mode 100644 services/iaas/model_server_vtpm_test.go delete mode 100644 services/iaas/v1api/model_server_vtpm.go delete mode 100644 services/iaas/v2api/model_server_vtpm.go delete mode 100644 services/iaas/v2beta1api/model_server_vtpm.go diff --git a/services/iaas/go.mod b/services/iaas/go.mod index e378480cd..813cf5b83 100644 --- a/services/iaas/go.mod +++ b/services/iaas/go.mod @@ -5,7 +5,7 @@ go 1.25 require ( github.com/google/go-cmp v0.7.0 github.com/stackitcloud/stackit-sdk-go/core v0.26.0 - github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.0 + github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.1 ) require ( diff --git a/services/iaas/go.sum b/services/iaas/go.sum index 3212faed2..8d37a23c8 100644 --- a/services/iaas/go.sum +++ b/services/iaas/go.sum @@ -6,5 +6,5 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/stackitcloud/stackit-sdk-go/core v0.26.0 h1:jQEb9gkehfp6VCP6TcYk7BI10cz4l0KM2L6hqYBH2QA= github.com/stackitcloud/stackit-sdk-go/core v0.26.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.0 h1:JPP6a0ME1tZXr4iB69d/LtJsCAr58ENBadFaK9f48/c= -github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.0/go.mod h1:NEz3f+GV5G++BE9/MmZCsXJyCih7jtg0pZuSyG2sLEs= +github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.1 h1:gslS9O2KiYbY2CUn49IQx7RnEXud2Q0ALOGrrob+u2E= +github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.1/go.mod h1:NEz3f+GV5G++BE9/MmZCsXJyCih7jtg0pZuSyG2sLEs= diff --git a/services/iaas/model_create_server_payload.go b/services/iaas/model_create_server_payload.go index d167f4d18..4c3c490fb 100644 --- a/services/iaas/model_create_server_payload.go +++ b/services/iaas/model_create_server_payload.go @@ -694,33 +694,6 @@ func setCreateServerPayloadGetVolumesAttributeType(arg *CreateServerPayloadGetVo *arg = &val } -/* - types and functions for vtpm -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetVtpmAttributeType = *ServerVtpm - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetVtpmArgType = ServerVtpm - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateServerPayloadGetVtpmRetType = ServerVtpm - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateServerPayloadGetVtpmAttributeTypeOk(arg CreateServerPayloadGetVtpmAttributeType) (ret CreateServerPayloadGetVtpmRetType, 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 setCreateServerPayloadGetVtpmAttributeType(arg *CreateServerPayloadGetVtpmAttributeType, val CreateServerPayloadGetVtpmRetType) { - *arg = &val -} - // CreateServerPayload Object that represents the request body for a server create. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateServerPayload struct { @@ -773,7 +746,6 @@ type CreateServerPayload struct { UserData CreateServerPayloadGetUserDataAttributeType `json:"userData,omitempty"` // A list of UUIDs. Volumes CreateServerPayloadGetVolumesAttributeType `json:"volumes,omitempty"` - Vtpm CreateServerPayloadGetVtpmAttributeType `json:"vtpm,omitempty"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1457,33 +1429,6 @@ func (o *CreateServerPayload) SetVolumes(v CreateServerPayloadGetVolumesRetType) setCreateServerPayloadGetVolumesAttributeType(&o.Volumes, v) } -// GetVtpm returns the Vtpm 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 *CreateServerPayload) GetVtpm() (res CreateServerPayloadGetVtpmRetType) { - res, _ = o.GetVtpmOk() - return -} - -// GetVtpmOk returns a tuple with the Vtpm 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 *CreateServerPayload) GetVtpmOk() (ret CreateServerPayloadGetVtpmRetType, ok bool) { - return getCreateServerPayloadGetVtpmAttributeTypeOk(o.Vtpm) -} - -// HasVtpm 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 *CreateServerPayload) HasVtpm() bool { - _, ok := o.GetVtpmOk() - return ok -} - -// SetVtpm gets a reference to the given ServerVtpm and assigns it to the Vtpm field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateServerPayload) SetVtpm(v CreateServerPayloadGetVtpmRetType) { - setCreateServerPayloadGetVtpmAttributeType(&o.Vtpm, v) -} - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} @@ -1562,9 +1507,6 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateServerPayloadGetVolumesAttributeTypeOk(o.Volumes); ok { toSerialize["Volumes"] = val } - if val, ok := getCreateServerPayloadGetVtpmAttributeTypeOk(o.Vtpm); ok { - toSerialize["Vtpm"] = val - } return toSerialize, nil } diff --git a/services/iaas/model_server.go b/services/iaas/model_server.go index 1c625b9e1..e09fd92cf 100644 --- a/services/iaas/model_server.go +++ b/services/iaas/model_server.go @@ -694,33 +694,6 @@ func setServerGetVolumesAttributeType(arg *ServerGetVolumesAttributeType, val Se *arg = &val } -/* - types and functions for vtpm -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetVtpmAttributeType = *ServerVtpm - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetVtpmArgType = ServerVtpm - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerGetVtpmRetType = ServerVtpm - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerGetVtpmAttributeTypeOk(arg ServerGetVtpmAttributeType) (ret ServerGetVtpmRetType, 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 setServerGetVtpmAttributeType(arg *ServerGetVtpmAttributeType, val ServerGetVtpmRetType) { - *arg = &val -} - // Server Representation of a single server object. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Server struct { @@ -772,7 +745,6 @@ type Server struct { UserData ServerGetUserDataAttributeType `json:"userData,omitempty"` // A list of UUIDs. Volumes ServerGetVolumesAttributeType `json:"volumes,omitempty"` - Vtpm ServerGetVtpmAttributeType `json:"vtpm,omitempty"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1462,33 +1434,6 @@ func (o *Server) SetVolumes(v ServerGetVolumesRetType) { setServerGetVolumesAttributeType(&o.Volumes, v) } -// GetVtpm returns the Vtpm 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 *Server) GetVtpm() (res ServerGetVtpmRetType) { - res, _ = o.GetVtpmOk() - return -} - -// GetVtpmOk returns a tuple with the Vtpm 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 *Server) GetVtpmOk() (ret ServerGetVtpmRetType, ok bool) { - return getServerGetVtpmAttributeTypeOk(o.Vtpm) -} - -// HasVtpm 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 *Server) HasVtpm() bool { - _, ok := o.GetVtpmOk() - return ok -} - -// SetVtpm gets a reference to the given ServerVtpm and assigns it to the Vtpm field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Server) SetVtpm(v ServerGetVtpmRetType) { - setServerGetVtpmAttributeType(&o.Vtpm, v) -} - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Server) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} @@ -1567,9 +1512,6 @@ func (o Server) ToMap() (map[string]interface{}, error) { if val, ok := getServerGetVolumesAttributeTypeOk(o.Volumes); ok { toSerialize["Volumes"] = val } - if val, ok := getServerGetVtpmAttributeTypeOk(o.Vtpm); ok { - toSerialize["Vtpm"] = val - } return toSerialize, nil } diff --git a/services/iaas/model_server_vtpm.go b/services/iaas/model_server_vtpm.go deleted file mode 100644 index 132fa9300..000000000 --- a/services/iaas/model_server_vtpm.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// 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 iaas - -import ( - "encoding/json" -) - -// checks if the ServerVtpm type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerVtpm{} - -/* - types and functions for enabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerVtpmgetEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerVtpmgetEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerVtpmgetEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServerVtpmgetEnabledAttributeTypeOk(arg ServerVtpmgetEnabledAttributeType) (ret ServerVtpmgetEnabledRetType, 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 setServerVtpmgetEnabledAttributeType(arg *ServerVtpmgetEnabledAttributeType, val ServerVtpmgetEnabledRetType) { - *arg = &val -} - -// ServerVtpm struct for ServerVtpm -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServerVtpm struct { - // Defines whether the server instance has the Virtual Trusted Platform Module (vTPM) enabled. - // REQUIRED - Enabled ServerVtpmgetEnabledAttributeType `json:"enabled" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServerVtpm ServerVtpm - -// NewServerVtpm instantiates a new ServerVtpm 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 NewServerVtpm(enabled ServerVtpmgetEnabledArgType) *ServerVtpm { - this := ServerVtpm{} - setServerVtpmgetEnabledAttributeType(&this.Enabled, enabled) - return &this -} - -// NewServerVtpmWithDefaults instantiates a new ServerVtpm 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 NewServerVtpmWithDefaults() *ServerVtpm { - this := ServerVtpm{} - var enabled bool = false - this.Enabled = &enabled - return &this -} - -// GetEnabled returns the Enabled field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerVtpm) GetEnabled() (ret ServerVtpmgetEnabledRetType) { - ret, _ = o.GetEnabledOk() - return ret -} - -// GetEnabledOk returns a tuple with the Enabled 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 *ServerVtpm) GetEnabledOk() (ret ServerVtpmgetEnabledRetType, ok bool) { - return getServerVtpmgetEnabledAttributeTypeOk(o.Enabled) -} - -// SetEnabled sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServerVtpm) SetEnabled(v ServerVtpmgetEnabledRetType) { - setServerVtpmgetEnabledAttributeType(&o.Enabled, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServerVtpm) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServerVtpmgetEnabledAttributeTypeOk(o.Enabled); ok { - toSerialize["Enabled"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableServerVtpm struct { - value *ServerVtpm - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServerVtpm) Get() *ServerVtpm { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServerVtpm) Set(val *ServerVtpm) { - 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 NullableServerVtpm) 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 *NullableServerVtpm) 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 NewNullableServerVtpm(val *ServerVtpm) *NullableServerVtpm { - return &NullableServerVtpm{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 NullableServerVtpm) 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 *NullableServerVtpm) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/model_server_vtpm_test.go b/services/iaas/model_server_vtpm_test.go deleted file mode 100644 index 603b15988..000000000 --- a/services/iaas/model_server_vtpm_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaas diff --git a/services/iaas/oas_commit b/services/iaas/oas_commit index 2fd4b6b8b..8ae9a8db5 100644 --- a/services/iaas/oas_commit +++ b/services/iaas/oas_commit @@ -1 +1 @@ -f05986bf33be92fa5cbe425bcf5e4a11dd3c7463 +e9fe931e91e0b8f067d5c12518398a52062ca794 diff --git a/services/iaas/v1api/client.go b/services/iaas/v1api/client.go index 3275c1901..72bc399ab 100644 --- a/services/iaas/v1api/client.go +++ b/services/iaas/v1api/client.go @@ -462,6 +462,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if r, ok := v.(*io.Reader); ok { + *r = bytes.NewReader(b) + return nil + } + // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. + if p, ok := v.(*[]byte); ok { + *p = b + return nil + } if f, ok := v.(*os.File); ok { f, err = os.CreateTemp("", "HttpClientFile") if err != nil { diff --git a/services/iaas/v1api/model_affinity_group.go b/services/iaas/v1api/model_affinity_group.go index eecdd7e7d..1177c5350 100644 --- a/services/iaas/v1api/model_affinity_group.go +++ b/services/iaas/v1api/model_affinity_group.go @@ -26,7 +26,7 @@ type AffinityGroup struct { // The servers that are part of the affinity group. Members []string `json:"members,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. Policy string `json:"policy"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_allowed_addresses_inner.go b/services/iaas/v1api/model_allowed_addresses_inner.go index 34b51e441..bdda96400 100644 --- a/services/iaas/v1api/model_allowed_addresses_inner.go +++ b/services/iaas/v1api/model_allowed_addresses_inner.go @@ -53,7 +53,11 @@ func (dst *AllowedAddressesInner) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") + } } } diff --git a/services/iaas/v1api/model_area.go b/services/iaas/v1api/model_area.go index dc5b8b704..85db00203 100644 --- a/services/iaas/v1api/model_area.go +++ b/services/iaas/v1api/model_area.go @@ -27,7 +27,7 @@ type Area struct { // A list of routes. Routes []Route `json:"routes,omitempty"` // Classless Inter-Domain Routing (CIDR). - TransferNetwork *string `json:"transferNetwork,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + TransferNetwork *string `json:"transferNetwork,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_area_config.go b/services/iaas/v1api/model_area_config.go index bc3c9e1ac..5cdee94d2 100644 --- a/services/iaas/v1api/model_area_config.go +++ b/services/iaas/v1api/model_area_config.go @@ -27,7 +27,7 @@ type AreaConfig struct { // A list of routes. Routes []Route `json:"routes,omitempty"` // Classless Inter-Domain Routing (CIDR). - TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_area_id.go b/services/iaas/v1api/model_area_id.go index 4c26ea620..be45904eb 100644 --- a/services/iaas/v1api/model_area_id.go +++ b/services/iaas/v1api/model_area_id.go @@ -14,6 +14,7 @@ package v1api import ( "encoding/json" "fmt" + "regexp" ) // AreaId - The identifier (ID) of an area. @@ -44,7 +45,8 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { err = json.Unmarshal(data, &dst.StaticAreaID) if err == nil { jsonStaticAreaID, _ := json.Marshal(dst.StaticAreaID) - if string(jsonStaticAreaID) == "{}" { // empty struct + // OVERRIDE: added expr after || + if string(jsonStaticAreaID) == "{}" || *dst.StaticAreaID == STATICAREAID_UNKNOWN_DEFAULT_OPEN_API { // empty struct or unknown fallback enum dst.StaticAreaID = nil } else { match++ @@ -57,10 +59,13 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { err = json.Unmarshal(data, &dst.String) if err == nil { jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { + // OVERRIDE: this pattern match is custom + regex := `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` + isMatched, _ := regexp.MatchString(regex, *dst.String) + if string(jsonString) != "{}" && isMatched { // empty struct match++ + } else { + dst.String = nil } } else { dst.String = nil @@ -75,7 +80,11 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(AreaId): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") + } } } diff --git a/services/iaas/v1api/model_backup.go b/services/iaas/v1api/model_backup.go index 2bdb1e378..1852883f9 100644 --- a/services/iaas/v1api/model_backup.go +++ b/services/iaas/v1api/model_backup.go @@ -34,7 +34,7 @@ type Backup struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v1api/model_base_security_group_rule.go b/services/iaas/v1api/model_base_security_group_rule.go index f1494d7a2..0f593ab8d 100644 --- a/services/iaas/v1api/model_base_security_group_rule.go +++ b/services/iaas/v1api/model_base_security_group_rule.go @@ -34,7 +34,7 @@ type BaseSecurityGroupRule struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v1api/model_boot_volume.go b/services/iaas/v1api/model_boot_volume.go index dbf68cd1e..4b163f6dc 100644 --- a/services/iaas/v1api/model_boot_volume.go +++ b/services/iaas/v1api/model_boot_volume.go @@ -25,7 +25,7 @@ type BootVolume struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` Source *BootVolumeSource `json:"source,omitempty"` diff --git a/services/iaas/v1api/model_create_affinity_group_payload.go b/services/iaas/v1api/model_create_affinity_group_payload.go index ac1ca0815..5d6862bdb 100644 --- a/services/iaas/v1api/model_create_affinity_group_payload.go +++ b/services/iaas/v1api/model_create_affinity_group_payload.go @@ -26,7 +26,7 @@ type CreateAffinityGroupPayload struct { // The servers that are part of the affinity group. Members []string `json:"members,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. Policy string `json:"policy"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_create_area_ipv4.go b/services/iaas/v1api/model_create_area_ipv4.go index e8e33301c..f129be403 100644 --- a/services/iaas/v1api/model_create_area_ipv4.go +++ b/services/iaas/v1api/model_create_area_ipv4.go @@ -27,7 +27,7 @@ type CreateAreaIPv4 struct { // A list of routes. Routes []Route `json:"routes,omitempty"` // Classless Inter-Domain Routing (CIDR). - TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // The default prefix length for networks in the network area. DefaultPrefixLen *int32 `json:"defaultPrefixLen,omitempty"` // The maximal prefix length for networks in the network area. diff --git a/services/iaas/v1api/model_create_backup_payload.go b/services/iaas/v1api/model_create_backup_payload.go index b04b4d254..3cc348175 100644 --- a/services/iaas/v1api/model_create_backup_payload.go +++ b/services/iaas/v1api/model_create_backup_payload.go @@ -26,7 +26,7 @@ type CreateBackupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` Source BackupSource `json:"source"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_create_image_payload.go b/services/iaas/v1api/model_create_image_payload.go index a299cc47e..7a367786b 100644 --- a/services/iaas/v1api/model_create_image_payload.go +++ b/services/iaas/v1api/model_create_image_payload.go @@ -40,7 +40,7 @@ type CreateImagePayload struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // When true the image is prevented from being deleted. diff --git a/services/iaas/v1api/model_create_key_pair_payload.go b/services/iaas/v1api/model_create_key_pair_payload.go index a08051344..a0c7b08f8 100644 --- a/services/iaas/v1api/model_create_key_pair_payload.go +++ b/services/iaas/v1api/model_create_key_pair_payload.go @@ -31,7 +31,7 @@ type CreateKeyPairPayload struct { // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` // Object that represents a public SSH key. - PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\\\s+[A-Za-z0-9+\\/]+[=]{0,3}(\\\\s+.+)?\\\\s*$"` + PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\s+[A-Za-z0-9+/]+[=]{0\\,3}(\\s+.+)?\\s*$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_create_network_area_payload.go b/services/iaas/v1api/model_create_network_area_payload.go index 279e7756f..229a1aa3b 100644 --- a/services/iaas/v1api/model_create_network_area_payload.go +++ b/services/iaas/v1api/model_create_network_area_payload.go @@ -25,7 +25,7 @@ type CreateNetworkAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_create_network_ipv4_body.go b/services/iaas/v1api/model_create_network_ipv4_body.go index 0ff9e41d3..ea72adf4d 100644 --- a/services/iaas/v1api/model_create_network_ipv4_body.go +++ b/services/iaas/v1api/model_create_network_ipv4_body.go @@ -21,11 +21,11 @@ var _ MappedNullable = &CreateNetworkIPv4Body{} // CreateNetworkIPv4Body The config object for an IPv4 network. type CreateNetworkIPv4Body struct { // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR). - Prefix *string `json:"prefix,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix *string `json:"prefix,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PrefixLength *int32 `json:"prefixLength,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_create_network_ipv6_body.go b/services/iaas/v1api/model_create_network_ipv6_body.go index 07b2f7683..31e403a70 100644 --- a/services/iaas/v1api/model_create_network_ipv6_body.go +++ b/services/iaas/v1api/model_create_network_ipv6_body.go @@ -21,11 +21,11 @@ var _ MappedNullable = &CreateNetworkIPv6Body{} // CreateNetworkIPv6Body The config object for an IPv6 network. type CreateNetworkIPv6Body struct { // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix *string `json:"prefix,omitempty" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix *string `json:"prefix,omitempty" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PrefixLength *int32 `json:"prefixLength,omitempty"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_create_network_payload.go b/services/iaas/v1api/model_create_network_payload.go index 49a18b511..add8b7f6e 100644 --- a/services/iaas/v1api/model_create_network_payload.go +++ b/services/iaas/v1api/model_create_network_payload.go @@ -27,7 +27,7 @@ type CreateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_create_nic_payload.go b/services/iaas/v1api/model_create_nic_payload.go index 73d855004..b2a53d8df 100644 --- a/services/iaas/v1api/model_create_nic_payload.go +++ b/services/iaas/v1api/model_create_nic_payload.go @@ -29,15 +29,15 @@ type CreateNicPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this network interface. diff --git a/services/iaas/v1api/model_create_protocol.go b/services/iaas/v1api/model_create_protocol.go index 556127128..102d4f471 100644 --- a/services/iaas/v1api/model_create_protocol.go +++ b/services/iaas/v1api/model_create_protocol.go @@ -75,7 +75,16 @@ func (dst *CreateProtocol) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + } } } diff --git a/services/iaas/v1api/model_create_public_ip_payload.go b/services/iaas/v1api/model_create_public_ip_payload.go index fdefe4427..4f4cbcb04 100644 --- a/services/iaas/v1api/model_create_public_ip_payload.go +++ b/services/iaas/v1api/model_create_public_ip_payload.go @@ -23,7 +23,7 @@ type CreatePublicIPPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ip *string `json:"ip,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ip *string `json:"ip,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v1api/model_create_security_group_payload.go b/services/iaas/v1api/model_create_security_group_payload.go index ccc2a79f9..783467944 100644 --- a/services/iaas/v1api/model_create_security_group_payload.go +++ b/services/iaas/v1api/model_create_security_group_payload.go @@ -31,7 +31,7 @@ type CreateSecurityGroupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A list containing security group rule objects. Rules []SecurityGroupRule `json:"rules,omitempty"` // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. diff --git a/services/iaas/v1api/model_create_security_group_rule_payload.go b/services/iaas/v1api/model_create_security_group_rule_payload.go index 7d7ad7b9f..faad5af02 100644 --- a/services/iaas/v1api/model_create_security_group_rule_payload.go +++ b/services/iaas/v1api/model_create_security_group_rule_payload.go @@ -34,7 +34,7 @@ type CreateSecurityGroupRulePayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v1api/model_create_server_payload.go b/services/iaas/v1api/model_create_server_payload.go index 2153f52a2..33085e606 100644 --- a/services/iaas/v1api/model_create_server_payload.go +++ b/services/iaas/v1api/model_create_server_payload.go @@ -45,12 +45,12 @@ type CreateServerPayload struct { // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` // Name of the machine type the server shall belong to. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` MaintenanceWindow *ServerMaintenance `json:"maintenanceWindow,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` Networking *CreateServerPayloadNetworking `json:"networking,omitempty"` // The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested. Nics []ServerNetwork `json:"nics,omitempty"` @@ -67,8 +67,7 @@ type CreateServerPayload struct { // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. Only shown when detailed information is requested. UserData *string `json:"userData,omitempty"` // The list of volumes attached to the server. - Volumes []string `json:"volumes,omitempty"` - Vtpm *ServerVTPM `json:"vtpm,omitempty"` + Volumes []string `json:"volumes,omitempty"` AdditionalProperties map[string]interface{} } @@ -881,38 +880,6 @@ func (o *CreateServerPayload) SetVolumes(v []string) { o.Volumes = v } -// GetVtpm returns the Vtpm field value if set, zero value otherwise. -func (o *CreateServerPayload) GetVtpm() ServerVTPM { - if o == nil || IsNil(o.Vtpm) { - var ret ServerVTPM - return ret - } - return *o.Vtpm -} - -// GetVtpmOk returns a tuple with the Vtpm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServerPayload) GetVtpmOk() (*ServerVTPM, bool) { - if o == nil || IsNil(o.Vtpm) { - return nil, false - } - return o.Vtpm, true -} - -// HasVtpm returns a boolean if a field has been set. -func (o *CreateServerPayload) HasVtpm() bool { - if o != nil && !IsNil(o.Vtpm) { - return true - } - - return false -} - -// SetVtpm gets a reference to the given ServerVTPM and assigns it to the Vtpm field. -func (o *CreateServerPayload) SetVtpm(v ServerVTPM) { - o.Vtpm = &v -} - func (o CreateServerPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -994,9 +961,6 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Volumes) { toSerialize["volumes"] = o.Volumes } - if !IsNil(o.Vtpm) { - toSerialize["vtpm"] = o.Vtpm - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1066,7 +1030,6 @@ func (o *CreateServerPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "updatedAt") delete(additionalProperties, "userData") delete(additionalProperties, "volumes") - delete(additionalProperties, "vtpm") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_create_server_payload_networking.go b/services/iaas/v1api/model_create_server_payload_networking.go index aaa9ac5b7..df56793fd 100644 --- a/services/iaas/v1api/model_create_server_payload_networking.go +++ b/services/iaas/v1api/model_create_server_payload_networking.go @@ -75,7 +75,16 @@ func (dst *CreateServerPayloadNetworking) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadNetworking)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadNetworking)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadNetworking)") + } } } diff --git a/services/iaas/v1api/model_create_snapshot_payload.go b/services/iaas/v1api/model_create_snapshot_payload.go index 2d1e69910..2e0b6fbbe 100644 --- a/services/iaas/v1api/model_create_snapshot_payload.go +++ b/services/iaas/v1api/model_create_snapshot_payload.go @@ -33,7 +33,7 @@ type CreateSnapshotPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. diff --git a/services/iaas/v1api/model_create_volume_payload.go b/services/iaas/v1api/model_create_volume_payload.go index b6cd063c3..8a8b19f8a 100644 --- a/services/iaas/v1api/model_create_volume_payload.go +++ b/services/iaas/v1api/model_create_volume_payload.go @@ -39,9 +39,9 @@ type CreateVolumePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ServerId *string `json:"serverId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Size in Gigabyte. diff --git a/services/iaas/v1api/model_image.go b/services/iaas/v1api/model_image.go index bb3b2ec56..92b2eac13 100644 --- a/services/iaas/v1api/model_image.go +++ b/services/iaas/v1api/model_image.go @@ -40,7 +40,7 @@ type Image struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // When true the image is prevented from being deleted. diff --git a/services/iaas/v1api/model_keypair.go b/services/iaas/v1api/model_keypair.go index ee177e627..358c9791e 100644 --- a/services/iaas/v1api/model_keypair.go +++ b/services/iaas/v1api/model_keypair.go @@ -31,7 +31,7 @@ type Keypair struct { // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` // Object that represents a public SSH key. - PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\\\s+[A-Za-z0-9+\\/]+[=]{0,3}(\\\\s+.+)?\\\\s*$"` + PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\s+[A-Za-z0-9+/]+[=]{0\\,3}(\\s+.+)?\\s*$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_machine_type.go b/services/iaas/v1api/model_machine_type.go index 79ec68504..729894a56 100644 --- a/services/iaas/v1api/model_machine_type.go +++ b/services/iaas/v1api/model_machine_type.go @@ -28,7 +28,7 @@ type MachineType struct { // Properties to control certain aspects or scheduling behavior for an object. ExtraSpecs map[string]interface{} `json:"extraSpecs,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Megabyte. Ram int64 `json:"ram"` // The number of virtual CPUs of a server. diff --git a/services/iaas/v1api/model_network.go b/services/iaas/v1api/model_network.go index c4f236335..861cbb388 100644 --- a/services/iaas/v1api/model_network.go +++ b/services/iaas/v1api/model_network.go @@ -27,9 +27,9 @@ type Network struct { // Enable or disable DHCP for a network. Dhcp *bool `json:"dhcp,omitempty"` // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gatewayv6 NullableString `json:"gatewayv6,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Gatewayv6 NullableString `json:"gatewayv6,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` Name string `json:"name"` @@ -42,7 +42,7 @@ type Network struct { Prefixes []string `json:"prefixes,omitempty"` PrefixesV6 []string `json:"prefixesV6,omitempty"` // Object that represents an IP address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`. diff --git a/services/iaas/v1api/model_network_area_ipv4.go b/services/iaas/v1api/model_network_area_ipv4.go index 1934a6550..d1ce5cf0b 100644 --- a/services/iaas/v1api/model_network_area_ipv4.go +++ b/services/iaas/v1api/model_network_area_ipv4.go @@ -27,7 +27,7 @@ type NetworkAreaIPv4 struct { // A list of routes. Routes []Route `json:"routes,omitempty"` // Classless Inter-Domain Routing (CIDR). - TransferNetwork *string `json:"transferNetwork,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + TransferNetwork *string `json:"transferNetwork,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // The default prefix length for networks in the network area. DefaultPrefixLen *int32 `json:"defaultPrefixLen,omitempty"` // The maximal prefix length for networks in the network area. diff --git a/services/iaas/v1api/model_network_range.go b/services/iaas/v1api/model_network_range.go index 270d90722..c666750a2 100644 --- a/services/iaas/v1api/model_network_range.go +++ b/services/iaas/v1api/model_network_range.go @@ -27,7 +27,7 @@ type NetworkRange struct { // Universally Unique Identifier (UUID). NetworkRangeId *string `json:"networkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_nic.go b/services/iaas/v1api/model_nic.go index b8ca43f07..ed3a85b1e 100644 --- a/services/iaas/v1api/model_nic.go +++ b/services/iaas/v1api/model_nic.go @@ -29,15 +29,15 @@ type NIC struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this network interface. diff --git a/services/iaas/v1api/model_partial_update_network_area_payload.go b/services/iaas/v1api/model_partial_update_network_area_payload.go index 6a46606be..984f2b8b0 100644 --- a/services/iaas/v1api/model_partial_update_network_area_payload.go +++ b/services/iaas/v1api/model_partial_update_network_area_payload.go @@ -24,7 +24,7 @@ type PartialUpdateNetworkAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_partial_update_network_payload.go b/services/iaas/v1api/model_partial_update_network_payload.go index b7165e016..0dd8893db 100644 --- a/services/iaas/v1api/model_partial_update_network_payload.go +++ b/services/iaas/v1api/model_partial_update_network_payload.go @@ -26,7 +26,7 @@ type PartialUpdateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_public_ip.go b/services/iaas/v1api/model_public_ip.go index b303337fd..059a57442 100644 --- a/services/iaas/v1api/model_public_ip.go +++ b/services/iaas/v1api/model_public_ip.go @@ -23,7 +23,7 @@ type PublicIp struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ip *string `json:"ip,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ip *string `json:"ip,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v1api/model_public_network.go b/services/iaas/v1api/model_public_network.go index 99d02bc0b..022c5a463 100644 --- a/services/iaas/v1api/model_public_network.go +++ b/services/iaas/v1api/model_public_network.go @@ -22,7 +22,7 @@ var _ MappedNullable = &PublicNetwork{} // PublicNetwork Public network. type PublicNetwork struct { // Classless Inter-Domain Routing (CIDR). - Cidr string `json:"cidr" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Cidr string `json:"cidr" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_resize_server_payload.go b/services/iaas/v1api/model_resize_server_payload.go index 3a1e9fc4a..101c09b61 100644 --- a/services/iaas/v1api/model_resize_server_payload.go +++ b/services/iaas/v1api/model_resize_server_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &ResizeServerPayload{} // ResizeServerPayload struct for ResizeServerPayload type ResizeServerPayload struct { // The name for a General Object. Matches Names and also UUIDs. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_route.go b/services/iaas/v1api/model_route.go index 2cd59b455..25dd59e19 100644 --- a/services/iaas/v1api/model_route.go +++ b/services/iaas/v1api/model_route.go @@ -27,9 +27,9 @@ type Route struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an IP address. - Nexthop string `json:"nexthop" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Nexthop string `json:"nexthop" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Universally Unique Identifier (UUID). RouteId *string `json:"routeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Date-time when resource was last updated. diff --git a/services/iaas/v1api/model_security_group.go b/services/iaas/v1api/model_security_group.go index 02351c003..aee7b2620 100644 --- a/services/iaas/v1api/model_security_group.go +++ b/services/iaas/v1api/model_security_group.go @@ -31,7 +31,7 @@ type SecurityGroup struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A list containing security group rule objects. Rules []SecurityGroupRule `json:"rules,omitempty"` // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. diff --git a/services/iaas/v1api/model_security_group_rule.go b/services/iaas/v1api/model_security_group_rule.go index 5f5d79522..efe774936 100644 --- a/services/iaas/v1api/model_security_group_rule.go +++ b/services/iaas/v1api/model_security_group_rule.go @@ -34,7 +34,7 @@ type SecurityGroupRule struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v1api/model_server.go b/services/iaas/v1api/model_server.go index 7605774eb..42b81ba7d 100644 --- a/services/iaas/v1api/model_server.go +++ b/services/iaas/v1api/model_server.go @@ -45,12 +45,12 @@ type Server struct { // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` // Name of the machine type the server shall belong to. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` MaintenanceWindow *ServerMaintenance `json:"maintenanceWindow,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` Networking *ServerNetworking `json:"networking,omitempty"` // The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested. Nics []ServerNetwork `json:"nics,omitempty"` @@ -67,8 +67,7 @@ type Server struct { // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. Only shown when detailed information is requested. UserData *string `json:"userData,omitempty"` // The list of volumes attached to the server. - Volumes []string `json:"volumes,omitempty"` - Vtpm *ServerVTPM `json:"vtpm,omitempty"` + Volumes []string `json:"volumes,omitempty"` AdditionalProperties map[string]interface{} } @@ -881,38 +880,6 @@ func (o *Server) SetVolumes(v []string) { o.Volumes = v } -// GetVtpm returns the Vtpm field value if set, zero value otherwise. -func (o *Server) GetVtpm() ServerVTPM { - if o == nil || IsNil(o.Vtpm) { - var ret ServerVTPM - return ret - } - return *o.Vtpm -} - -// GetVtpmOk returns a tuple with the Vtpm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Server) GetVtpmOk() (*ServerVTPM, bool) { - if o == nil || IsNil(o.Vtpm) { - return nil, false - } - return o.Vtpm, true -} - -// HasVtpm returns a boolean if a field has been set. -func (o *Server) HasVtpm() bool { - if o != nil && !IsNil(o.Vtpm) { - return true - } - - return false -} - -// SetVtpm gets a reference to the given ServerVTPM and assigns it to the Vtpm field. -func (o *Server) SetVtpm(v ServerVTPM) { - o.Vtpm = &v -} - func (o Server) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -994,9 +961,6 @@ func (o Server) ToMap() (map[string]interface{}, error) { if !IsNil(o.Volumes) { toSerialize["volumes"] = o.Volumes } - if !IsNil(o.Vtpm) { - toSerialize["vtpm"] = o.Vtpm - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1066,7 +1030,6 @@ func (o *Server) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "updatedAt") delete(additionalProperties, "userData") delete(additionalProperties, "volumes") - delete(additionalProperties, "vtpm") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v1api/model_server_network.go b/services/iaas/v1api/model_server_network.go index 30cf5fa05..24f01b189 100644 --- a/services/iaas/v1api/model_server_network.go +++ b/services/iaas/v1api/model_server_network.go @@ -24,21 +24,21 @@ type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents an MAC address. Mac string `json:"mac" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // Universally Unique Identifier (UUID). NetworkId string `json:"networkId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The name for a General Object. Matches Names and also UUIDs. - NetworkName string `json:"networkName" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + NetworkName string `json:"networkName" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NicId string `json:"nicId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this server network interface. NicSecurity bool `json:"nicSecurity"` // Object that represents an IP address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list of UUIDs. SecurityGroups []string `json:"securityGroups,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_server_networking.go b/services/iaas/v1api/model_server_networking.go index fdc5392b8..da60c37b2 100644 --- a/services/iaas/v1api/model_server_networking.go +++ b/services/iaas/v1api/model_server_networking.go @@ -75,7 +75,16 @@ func (dst *ServerNetworking) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + } } } diff --git a/services/iaas/v1api/model_server_vtpm.go b/services/iaas/v1api/model_server_vtpm.go deleted file mode 100644 index 89a13a044..000000000 --- a/services/iaas/v1api/model_server_vtpm.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -STACKIT IaaS API - -This API is deprecated. It will be retired on 01.03.2027. Please use the STACKIT IaaS API V2 instead. - -API version: 1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the ServerVTPM type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerVTPM{} - -// ServerVTPM Configuration for the Virtual Trusted Platform Module (vTPM). -type ServerVTPM struct { - // Defines whether the server instance has the Virtual Trusted Platform Module (vTPM) enabled. - Enabled bool `json:"enabled"` - AdditionalProperties map[string]interface{} -} - -type _ServerVTPM ServerVTPM - -// NewServerVTPM instantiates a new ServerVTPM 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 NewServerVTPM(enabled bool) *ServerVTPM { - this := ServerVTPM{} - this.Enabled = enabled - return &this -} - -// NewServerVTPMWithDefaults instantiates a new ServerVTPM 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 NewServerVTPMWithDefaults() *ServerVTPM { - this := ServerVTPM{} - var enabled bool = false - this.Enabled = enabled - return &this -} - -// GetEnabled returns the Enabled field value -func (o *ServerVTPM) GetEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -func (o *ServerVTPM) GetEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Enabled, true -} - -// SetEnabled sets field value -func (o *ServerVTPM) SetEnabled(v bool) { - o.Enabled = v -} - -func (o ServerVTPM) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ServerVTPM) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["enabled"] = o.Enabled - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ServerVTPM) 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{ - "enabled", - } - - 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) - } - } - - varServerVTPM := _ServerVTPM{} - - err = json.Unmarshal(data, &varServerVTPM) - - if err != nil { - return err - } - - *o = ServerVTPM(varServerVTPM) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "enabled") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableServerVTPM struct { - value *ServerVTPM - isSet bool -} - -func (v NullableServerVTPM) Get() *ServerVTPM { - return v.value -} - -func (v *NullableServerVTPM) Set(val *ServerVTPM) { - v.value = val - v.isSet = true -} - -func (v NullableServerVTPM) IsSet() bool { - return v.isSet -} - -func (v *NullableServerVTPM) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServerVTPM(val *ServerVTPM) *NullableServerVTPM { - return &NullableServerVTPM{value: val, isSet: true} -} - -func (v NullableServerVTPM) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServerVTPM) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v1api/model_snapshot.go b/services/iaas/v1api/model_snapshot.go index 8d406e73f..6ac92a694 100644 --- a/services/iaas/v1api/model_snapshot.go +++ b/services/iaas/v1api/model_snapshot.go @@ -33,7 +33,7 @@ type Snapshot struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. diff --git a/services/iaas/v1api/model_update_backup_payload.go b/services/iaas/v1api/model_update_backup_payload.go index 79c8f532e..8791527bd 100644 --- a/services/iaas/v1api/model_update_backup_payload.go +++ b/services/iaas/v1api/model_update_backup_payload.go @@ -34,7 +34,7 @@ type UpdateBackupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v1api/model_update_image_payload.go b/services/iaas/v1api/model_update_image_payload.go index ef53beff2..da3f15dca 100644 --- a/services/iaas/v1api/model_update_image_payload.go +++ b/services/iaas/v1api/model_update_image_payload.go @@ -31,7 +31,7 @@ type UpdateImagePayload struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // When true the image is prevented from being deleted. Protected *bool `json:"protected,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_update_network_ipv4_body.go b/services/iaas/v1api/model_update_network_ipv4_body.go index e5d57b326..6066784de 100644 --- a/services/iaas/v1api/model_update_network_ipv4_body.go +++ b/services/iaas/v1api/model_update_network_ipv4_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv4Body{} // UpdateNetworkIPv4Body The config object for a IPv4 network update. type UpdateNetworkIPv4Body struct { // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_update_network_ipv6_body.go b/services/iaas/v1api/model_update_network_ipv6_body.go index 69a79816b..135fb22f1 100644 --- a/services/iaas/v1api/model_update_network_ipv6_body.go +++ b/services/iaas/v1api/model_update_network_ipv6_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv6Body{} // UpdateNetworkIPv6Body The config object for a IPv6 network update. type UpdateNetworkIPv6Body struct { // The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v1api/model_update_nic_payload.go b/services/iaas/v1api/model_update_nic_payload.go index e921b0d2d..1ac98e92a 100644 --- a/services/iaas/v1api/model_update_nic_payload.go +++ b/services/iaas/v1api/model_update_nic_payload.go @@ -27,7 +27,7 @@ type UpdateNicPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // If this is set to false, then no security groups will apply to this network interface. NicSecurity *bool `json:"nicSecurity,omitempty"` // A list of UUIDs. diff --git a/services/iaas/v1api/model_update_public_ip_payload.go b/services/iaas/v1api/model_update_public_ip_payload.go index 009470b89..a7ce83652 100644 --- a/services/iaas/v1api/model_update_public_ip_payload.go +++ b/services/iaas/v1api/model_update_public_ip_payload.go @@ -23,7 +23,7 @@ type UpdatePublicIPPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ip *string `json:"ip,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ip *string `json:"ip,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v1api/model_update_security_group_payload.go b/services/iaas/v1api/model_update_security_group_payload.go index 9c427dde0..ad38bf03c 100644 --- a/services/iaas/v1api/model_update_security_group_payload.go +++ b/services/iaas/v1api/model_update_security_group_payload.go @@ -25,7 +25,7 @@ type UpdateSecurityGroupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_update_server_payload.go b/services/iaas/v1api/model_update_server_payload.go index 883c9cf4b..ab0c49d3b 100644 --- a/services/iaas/v1api/model_update_server_payload.go +++ b/services/iaas/v1api/model_update_server_payload.go @@ -25,7 +25,7 @@ type UpdateServerPayload struct { // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name *string `json:"name,omitempty" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name *string `json:"name,omitempty" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_update_snapshot_payload.go b/services/iaas/v1api/model_update_snapshot_payload.go index b8f6824d5..af0fee1ff 100644 --- a/services/iaas/v1api/model_update_snapshot_payload.go +++ b/services/iaas/v1api/model_update_snapshot_payload.go @@ -25,7 +25,7 @@ type UpdateSnapshotPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_update_volume_payload.go b/services/iaas/v1api/model_update_volume_payload.go index 2ee3e3adf..206ea639e 100644 --- a/services/iaas/v1api/model_update_volume_payload.go +++ b/services/iaas/v1api/model_update_volume_payload.go @@ -28,7 +28,7 @@ type UpdateVolumePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_volume.go b/services/iaas/v1api/model_volume.go index d4584452f..5d4e8d0c4 100644 --- a/services/iaas/v1api/model_volume.go +++ b/services/iaas/v1api/model_volume.go @@ -39,9 +39,9 @@ type Volume struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ServerId *string `json:"serverId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Size in Gigabyte. diff --git a/services/iaas/v1api/model_volume_encryption_parameter.go b/services/iaas/v1api/model_volume_encryption_parameter.go index 9f028ef8a..3da5cf8b7 100644 --- a/services/iaas/v1api/model_volume_encryption_parameter.go +++ b/services/iaas/v1api/model_volume_encryption_parameter.go @@ -32,7 +32,7 @@ type VolumeEncryptionParameter struct { // Optional predefined secret, which will be encrypted against the key-encryption-key within the STACKIT-KMS. If not defined, a random secret will be generated by the API and encrypted against the STACKIT-KMS. If a key-payload is provided here, it must be base64 encoded. KeyPayload *string `json:"keyPayload,omitempty"` // Service-Account linked to the Key within the STACKIT-KMS. - ServiceAccount string `json:"serviceAccount" validate:"regexp=[a-z0-9-]+(?:\\\\.[a-z0-9]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"` + ServiceAccount string `json:"serviceAccount" validate:"regexp=[a-z0-9-]+(?:\\.[a-z0-9]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v1api/model_volume_performance_class.go b/services/iaas/v1api/model_volume_performance_class.go index 94675e8c8..33b839ce7 100644 --- a/services/iaas/v1api/model_volume_performance_class.go +++ b/services/iaas/v1api/model_volume_performance_class.go @@ -28,7 +28,7 @@ type VolumePerformanceClass struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Throughput in Megabyte per second. Throughput *int64 `json:"throughput,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/client.go b/services/iaas/v2alpha1api/client.go index 2a21d9728..966f9ab48 100644 --- a/services/iaas/v2alpha1api/client.go +++ b/services/iaas/v2alpha1api/client.go @@ -462,6 +462,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if r, ok := v.(*io.Reader); ok { + *r = bytes.NewReader(b) + return nil + } + // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. + if p, ok := v.(*[]byte); ok { + *p = b + return nil + } if f, ok := v.(*os.File); ok { f, err = os.CreateTemp("", "HttpClientFile") if err != nil { diff --git a/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go b/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go index 3b4c94f5d..d53d488a4 100644 --- a/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go +++ b/services/iaas/v2alpha1api/model_add_routing_table_to_area_payload.go @@ -35,7 +35,7 @@ type AddRoutingTableToAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go b/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go index cc4b751c1..fdc5fecfd 100644 --- a/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go +++ b/services/iaas/v2alpha1api/model_add_vpc_routing_table_payload.go @@ -33,7 +33,7 @@ type AddVPCRoutingTablePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2alpha1api/model_create_network_ipv4.go b/services/iaas/v2alpha1api/model_create_network_ipv4.go index b4a856b9c..08aa1524f 100644 --- a/services/iaas/v2alpha1api/model_create_network_ipv4.go +++ b/services/iaas/v2alpha1api/model_create_network_ipv4.go @@ -75,7 +75,16 @@ func (dst *CreateNetworkIPv4) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + } } } diff --git a/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go b/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go index 54ce7ed74..73b8a2c65 100644 --- a/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go +++ b/services/iaas/v2alpha1api/model_create_network_ipv4_with_prefix.go @@ -22,11 +22,11 @@ var _ MappedNullable = &CreateNetworkIPv4WithPrefix{} // CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix. type CreateNetworkIPv4WithPrefix struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` // IPv4 Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_create_network_ipv6.go b/services/iaas/v2alpha1api/model_create_network_ipv6.go index 88f65bfff..bd828da0a 100644 --- a/services/iaas/v2alpha1api/model_create_network_ipv6.go +++ b/services/iaas/v2alpha1api/model_create_network_ipv6.go @@ -75,7 +75,16 @@ func (dst *CreateNetworkIPv6) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + } } } diff --git a/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go b/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go index 9f3f7d77a..9fe0c649b 100644 --- a/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go +++ b/services/iaas/v2alpha1api/model_create_network_ipv6_with_prefix.go @@ -22,11 +22,11 @@ var _ MappedNullable = &CreateNetworkIPv6WithPrefix{} // CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix. type CreateNetworkIPv6WithPrefix struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_create_network_payload.go b/services/iaas/v2alpha1api/model_create_network_payload.go index 36dba6993..05b926c76 100644 --- a/services/iaas/v2alpha1api/model_create_network_payload.go +++ b/services/iaas/v2alpha1api/model_create_network_payload.go @@ -28,7 +28,7 @@ type CreateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go b/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go index dde072d2d..f4295955a 100644 --- a/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go +++ b/services/iaas/v2alpha1api/model_create_vpc_network_range_payload.go @@ -16,388 +16,73 @@ import ( "fmt" ) -// checks if the CreateVPCNetworkRangePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateVPCNetworkRangePayload{} - -// CreateVPCNetworkRangePayload The request body of a VPC network range. +// CreateVPCNetworkRangePayload - The request body of a VPC network range. type CreateVPCNetworkRangePayload struct { - // The default prefix length for network ranges in the VPC. - DefaultPrefixLen *int64 `json:"defaultPrefixLen,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - IpVersion NetworkRangeIPv4RequestIpVersion `json:"ipVersion"` - // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The maximal prefix length for network ranges in the VPC. - MaxPrefixLen *int64 `json:"maxPrefixLen,omitempty"` - // The minimal prefix length for network ranges in the VPC. - MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` - AdditionalProperties map[string]interface{} -} - -type _CreateVPCNetworkRangePayload CreateVPCNetworkRangePayload - -// NewCreateVPCNetworkRangePayload instantiates a new CreateVPCNetworkRangePayload 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 NewCreateVPCNetworkRangePayload(ipVersion NetworkRangeIPv4RequestIpVersion, prefix string) *CreateVPCNetworkRangePayload { - this := CreateVPCNetworkRangePayload{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - this.IpVersion = ipVersion - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - this.Prefix = prefix - return &this -} - -// NewCreateVPCNetworkRangePayloadWithDefaults instantiates a new CreateVPCNetworkRangePayload 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 NewCreateVPCNetworkRangePayloadWithDefaults() *CreateVPCNetworkRangePayload { - this := CreateVPCNetworkRangePayload{} - var defaultPrefixLen int64 = 25 - this.DefaultPrefixLen = &defaultPrefixLen - var maxPrefixLen int64 = 29 - this.MaxPrefixLen = &maxPrefixLen - var minPrefixLen int64 = 24 - this.MinPrefixLen = &minPrefixLen - return &this -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. -func (o *CreateVPCNetworkRangePayload) GetDefaultPrefixLen() int64 { - if o == nil || IsNil(o.DefaultPrefixLen) { - var ret int64 - return ret - } - return *o.DefaultPrefixLen -} - -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetDefaultPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultPrefixLen) { - return nil, false - } - return o.DefaultPrefixLen, true -} - -// HasDefaultPrefixLen returns a boolean if a field has been set. -func (o *CreateVPCNetworkRangePayload) HasDefaultPrefixLen() bool { - if o != nil && !IsNil(o.DefaultPrefixLen) { - return true - } - - return false -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -func (o *CreateVPCNetworkRangePayload) SetDefaultPrefixLen(v int64) { - o.DefaultPrefixLen = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *CreateVPCNetworkRangePayload) 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 *CreateVPCNetworkRangePayload) 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 *CreateVPCNetworkRangePayload) 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 *CreateVPCNetworkRangePayload) SetDescription(v string) { - o.Description = &v -} - -// GetIpVersion returns the IpVersion field value -func (o *CreateVPCNetworkRangePayload) GetIpVersion() NetworkRangeIPv4RequestIpVersion { - if o == nil { - var ret NetworkRangeIPv4RequestIpVersion - return ret - } - - return o.IpVersion -} - -// GetIpVersionOk returns a tuple with the IpVersion field value -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetIpVersionOk() (*NetworkRangeIPv4RequestIpVersion, bool) { - if o == nil { - return nil, false - } - return &o.IpVersion, true -} - -// SetIpVersion sets field value -func (o *CreateVPCNetworkRangePayload) SetIpVersion(v NetworkRangeIPv4RequestIpVersion) { - o.IpVersion = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *CreateVPCNetworkRangePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *CreateVPCNetworkRangePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *CreateVPCNetworkRangePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. -func (o *CreateVPCNetworkRangePayload) GetMaxPrefixLen() int64 { - if o == nil || IsNil(o.MaxPrefixLen) { - var ret int64 - return ret - } - return *o.MaxPrefixLen -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetMaxPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MaxPrefixLen) { - return nil, false - } - return o.MaxPrefixLen, true + NetworkRangeIPv4Request *NetworkRangeIPv4Request } -// HasMaxPrefixLen returns a boolean if a field has been set. -func (o *CreateVPCNetworkRangePayload) HasMaxPrefixLen() bool { - if o != nil && !IsNil(o.MaxPrefixLen) { - return true +// NetworkRangeIPv4RequestAsCreateVPCNetworkRangePayload is a convenience function that returns NetworkRangeIPv4Request wrapped in CreateVPCNetworkRangePayload +func NetworkRangeIPv4RequestAsCreateVPCNetworkRangePayload(v *NetworkRangeIPv4Request) CreateVPCNetworkRangePayload { + return CreateVPCNetworkRangePayload{ + NetworkRangeIPv4Request: v, } - - return false -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -func (o *CreateVPCNetworkRangePayload) SetMaxPrefixLen(v int64) { - o.MaxPrefixLen = &v -} - -// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. -func (o *CreateVPCNetworkRangePayload) GetMinPrefixLen() int64 { - if o == nil || IsNil(o.MinPrefixLen) { - var ret int64 - return ret - } - return *o.MinPrefixLen -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetMinPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MinPrefixLen) { - return nil, false - } - return o.MinPrefixLen, true -} - -// HasMinPrefixLen returns a boolean if a field has been set. -func (o *CreateVPCNetworkRangePayload) HasMinPrefixLen() bool { - if o != nil && !IsNil(o.MinPrefixLen) { - return true - } - - return false -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -func (o *CreateVPCNetworkRangePayload) SetMinPrefixLen(v int64) { - o.MinPrefixLen = &v } -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *CreateVPCNetworkRangePayload) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateVPCNetworkRangePayload) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'ipv4' + if jsonDict["ipVersion"] == "ipv4" { + // try to unmarshal JSON data into NetworkRangeIPv4Request + err = json.Unmarshal(data, &dst.NetworkRangeIPv4Request) + if err == nil { + return nil // data stored in dst.NetworkRangeIPv4Request, return on the first match + } else { + dst.NetworkRangeIPv4Request = nil + return fmt.Errorf("failed to unmarshal CreateVPCNetworkRangePayload as NetworkRangeIPv4Request: %s", err.Error()) + } } - return o.Nameservers -} -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true + return nil } -// HasNameservers returns a boolean if a field has been set. -func (o *CreateVPCNetworkRangePayload) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { + if src.NetworkRangeIPv4Request != nil { + return json.Marshal(&src.NetworkRangeIPv4Request) } - return false + return nil, nil // no data in oneOf schemas } -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *CreateVPCNetworkRangePayload) SetNameservers(v []string) { - o.Nameservers = v -} - -// GetPrefix returns the Prefix field value -func (o *CreateVPCNetworkRangePayload) GetPrefix() string { - if o == nil { - var ret string - return ret +// Get the actual instance +func (obj *CreateVPCNetworkRangePayload) GetActualInstance() interface{} { + if obj == nil { + return nil } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *CreateVPCNetworkRangePayload) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false + if obj.NetworkRangeIPv4Request != nil { + return obj.NetworkRangeIPv4Request } - return &o.Prefix, true -} -// SetPrefix sets field value -func (o *CreateVPCNetworkRangePayload) SetPrefix(v string) { - o.Prefix = v -} - -func (o CreateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) + // all schemas are nil + return nil } -func (o CreateVPCNetworkRangePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DefaultPrefixLen) { - toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["ipVersion"] = o.IpVersion - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.MaxPrefixLen) { - toSerialize["maxPrefixLen"] = o.MaxPrefixLen - } - if !IsNil(o.MinPrefixLen) { - toSerialize["minPrefixLen"] = o.MinPrefixLen - } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers - } - toSerialize["prefix"] = o.Prefix - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CreateVPCNetworkRangePayload) 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{ - "ipVersion", - "prefix", - } - - 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) - } - } - - varCreateVPCNetworkRangePayload := _CreateVPCNetworkRangePayload{} - - err = json.Unmarshal(data, &varCreateVPCNetworkRangePayload) - - if err != nil { - return err - } - - *o = CreateVPCNetworkRangePayload(varCreateVPCNetworkRangePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "defaultPrefixLen") - delete(additionalProperties, "description") - delete(additionalProperties, "ipVersion") - delete(additionalProperties, "labels") - delete(additionalProperties, "maxPrefixLen") - delete(additionalProperties, "minPrefixLen") - delete(additionalProperties, "nameservers") - delete(additionalProperties, "prefix") - o.AdditionalProperties = additionalProperties +// Get the actual instance value +func (obj CreateVPCNetworkRangePayload) GetActualInstanceValue() interface{} { + if obj.NetworkRangeIPv4Request != nil { + return *obj.NetworkRangeIPv4Request } - return err + // all schemas are nil + return nil } type NullableCreateVPCNetworkRangePayload struct { diff --git a/services/iaas/v2alpha1api/model_create_vpc_payload.go b/services/iaas/v2alpha1api/model_create_vpc_payload.go index e8d150c26..ea4024d80 100644 --- a/services/iaas/v2alpha1api/model_create_vpc_payload.go +++ b/services/iaas/v2alpha1api/model_create_vpc_payload.go @@ -26,7 +26,7 @@ type CreateVPCPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_destination_cidrv4.go b/services/iaas/v2alpha1api/model_destination_cidrv4.go index 0055e8458..7fa385304 100644 --- a/services/iaas/v2alpha1api/model_destination_cidrv4.go +++ b/services/iaas/v2alpha1api/model_destination_cidrv4.go @@ -23,7 +23,7 @@ var _ MappedNullable = &DestinationCIDRv4{} type DestinationCIDRv4 struct { Type string `json:"type"` // An CIDRv4 string. - Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_destination_cidrv6.go b/services/iaas/v2alpha1api/model_destination_cidrv6.go index 10b8436c2..9d360e9ec 100644 --- a/services/iaas/v2alpha1api/model_destination_cidrv6.go +++ b/services/iaas/v2alpha1api/model_destination_cidrv6.go @@ -23,7 +23,7 @@ var _ MappedNullable = &DestinationCIDRv6{} type DestinationCIDRv6 struct { Type string `json:"type"` // An CIDRv6 string. - Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_network_ipv4.go b/services/iaas/v2alpha1api/model_network_ipv4.go index d72b2cd00..a154ef12d 100644 --- a/services/iaas/v2alpha1api/model_network_ipv4.go +++ b/services/iaas/v2alpha1api/model_network_ipv4.go @@ -22,12 +22,12 @@ var _ MappedNullable = &NetworkIPv4{} // NetworkIPv4 Object that represents the IPv4 part of a network. type NetworkIPv4 struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` Prefixes []string `json:"prefixes"` // String that represents an IPv4 address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_network_ipv6.go b/services/iaas/v2alpha1api/model_network_ipv6.go index 0cae02b9c..c916696b4 100644 --- a/services/iaas/v2alpha1api/model_network_ipv6.go +++ b/services/iaas/v2alpha1api/model_network_ipv6.go @@ -22,7 +22,7 @@ var _ MappedNullable = &NetworkIPv6{} // NetworkIPv6 Object that represents the IPv6 part of a network. type NetworkIPv6 struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` Prefixes []string `json:"prefixes"` diff --git a/services/iaas/v2alpha1api/model_network_range_ipv4_request.go b/services/iaas/v2alpha1api/model_network_range_ipv4_request.go index cea419cec..8bb847b52 100644 --- a/services/iaas/v2alpha1api/model_network_range_ipv4_request.go +++ b/services/iaas/v2alpha1api/model_network_range_ipv4_request.go @@ -35,7 +35,7 @@ type NetworkRangeIPv4Request struct { // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_nexthop_ipv4.go b/services/iaas/v2alpha1api/model_nexthop_ipv4.go index 18bb5fae7..2c57966c2 100644 --- a/services/iaas/v2alpha1api/model_nexthop_ipv4.go +++ b/services/iaas/v2alpha1api/model_nexthop_ipv4.go @@ -23,7 +23,7 @@ var _ MappedNullable = &NexthopIPv4{} type NexthopIPv4 struct { Type string `json:"type"` // An IPv4 address. - Value string `json:"value" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Value string `json:"value" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_nexthop_ipv6.go b/services/iaas/v2alpha1api/model_nexthop_ipv6.go index cc3bd3d51..3c73d303d 100644 --- a/services/iaas/v2alpha1api/model_nexthop_ipv6.go +++ b/services/iaas/v2alpha1api/model_nexthop_ipv6.go @@ -23,7 +23,7 @@ var _ MappedNullable = &NexthopIPv6{} type NexthopIPv6 struct { Type string `json:"type"` // An IPv6 address. - Value string `json:"value" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Value string `json:"value" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_partial_update_network_payload.go b/services/iaas/v2alpha1api/model_partial_update_network_payload.go index 2f6463322..d62ff4960 100644 --- a/services/iaas/v2alpha1api/model_partial_update_network_payload.go +++ b/services/iaas/v2alpha1api/model_partial_update_network_payload.go @@ -27,7 +27,7 @@ type PartialUpdateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go b/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go index fc26c8aee..3b45029b4 100644 --- a/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go +++ b/services/iaas/v2alpha1api/model_partial_update_vpc_payload.go @@ -25,7 +25,7 @@ type PartialUpdateVPCPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_routing_table.go b/services/iaas/v2alpha1api/model_routing_table.go index 0561fe4f0..1afc6af34 100644 --- a/services/iaas/v2alpha1api/model_routing_table.go +++ b/services/iaas/v2alpha1api/model_routing_table.go @@ -35,7 +35,7 @@ type RoutingTable struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2alpha1api/model_update_network_ipv4_body.go b/services/iaas/v2alpha1api/model_update_network_ipv4_body.go index d9dba5220..d0b298977 100644 --- a/services/iaas/v2alpha1api/model_update_network_ipv4_body.go +++ b/services/iaas/v2alpha1api/model_update_network_ipv4_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv4Body{} // UpdateNetworkIPv4Body The config object for a IPv4 network update. type UpdateNetworkIPv4Body struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_update_network_ipv6_body.go b/services/iaas/v2alpha1api/model_update_network_ipv6_body.go index b69240f39..f48ad8685 100644 --- a/services/iaas/v2alpha1api/model_update_network_ipv6_body.go +++ b/services/iaas/v2alpha1api/model_update_network_ipv6_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv6Body{} // UpdateNetworkIPv6Body The config object for a IPv6 network update. type UpdateNetworkIPv6Body struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go b/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go index bc09ff08b..30c815262 100644 --- a/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go +++ b/services/iaas/v2alpha1api/model_update_routing_table_of_area_payload.go @@ -27,7 +27,7 @@ type UpdateRoutingTableOfAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go b/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go index 7c4d4964e..2f7bb4264 100644 --- a/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go +++ b/services/iaas/v2alpha1api/model_update_vpc_network_range_payload.go @@ -16,346 +16,73 @@ import ( "fmt" ) -// checks if the UpdateVPCNetworkRangePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateVPCNetworkRangePayload{} - -// UpdateVPCNetworkRangePayload Object that represents the request body for a VPC network range update. +// UpdateVPCNetworkRangePayload - Object that represents the request body for a VPC network range update. type UpdateVPCNetworkRangePayload struct { - // The default prefix length for network ranges in the VPC. - DefaultPrefixLen *int64 `json:"defaultPrefixLen,omitempty"` - // Description Object. Allows string up to 255 Characters. - Description *string `json:"description,omitempty"` - IpVersion V1UpdateVPCNetworkRangeIPv4IpVersion `json:"ipVersion"` - // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. - Labels map[string]interface{} `json:"labels,omitempty"` - // The maximal prefix length for network ranges in the VPC. - MaxPrefixLen *int64 `json:"maxPrefixLen,omitempty"` - // The minimal prefix length for network ranges in the VPC. - MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` - // A list containing DNS Servers/Nameservers for IPv4. - Nameservers []string `json:"nameservers,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _UpdateVPCNetworkRangePayload UpdateVPCNetworkRangePayload - -// NewUpdateVPCNetworkRangePayload instantiates a new UpdateVPCNetworkRangePayload 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 NewUpdateVPCNetworkRangePayload(ipVersion V1UpdateVPCNetworkRangeIPv4IpVersion) *UpdateVPCNetworkRangePayload { - this := UpdateVPCNetworkRangePayload{} - this.IpVersion = ipVersion - return &this -} - -// NewUpdateVPCNetworkRangePayloadWithDefaults instantiates a new UpdateVPCNetworkRangePayload 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 NewUpdateVPCNetworkRangePayloadWithDefaults() *UpdateVPCNetworkRangePayload { - this := UpdateVPCNetworkRangePayload{} - return &this -} - -// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. -func (o *UpdateVPCNetworkRangePayload) GetDefaultPrefixLen() int64 { - if o == nil || IsNil(o.DefaultPrefixLen) { - var ret int64 - return ret - } - return *o.DefaultPrefixLen + V1UpdateVPCNetworkRangeIPv4 *V1UpdateVPCNetworkRangeIPv4 } -// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCNetworkRangePayload) GetDefaultPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.DefaultPrefixLen) { - return nil, false +// V1UpdateVPCNetworkRangeIPv4AsUpdateVPCNetworkRangePayload is a convenience function that returns V1UpdateVPCNetworkRangeIPv4 wrapped in UpdateVPCNetworkRangePayload +func V1UpdateVPCNetworkRangeIPv4AsUpdateVPCNetworkRangePayload(v *V1UpdateVPCNetworkRangeIPv4) UpdateVPCNetworkRangePayload { + return UpdateVPCNetworkRangePayload{ + V1UpdateVPCNetworkRangeIPv4: v, } - return o.DefaultPrefixLen, true -} - -// HasDefaultPrefixLen returns a boolean if a field has been set. -func (o *UpdateVPCNetworkRangePayload) HasDefaultPrefixLen() bool { - if o != nil && !IsNil(o.DefaultPrefixLen) { - return true - } - - return false -} - -// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. -func (o *UpdateVPCNetworkRangePayload) SetDefaultPrefixLen(v int64) { - o.DefaultPrefixLen = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *UpdateVPCNetworkRangePayload) 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 *UpdateVPCNetworkRangePayload) 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 *UpdateVPCNetworkRangePayload) 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 *UpdateVPCNetworkRangePayload) SetDescription(v string) { - o.Description = &v } -// GetIpVersion returns the IpVersion field value -func (o *UpdateVPCNetworkRangePayload) GetIpVersion() V1UpdateVPCNetworkRangeIPv4IpVersion { - if o == nil { - var ret V1UpdateVPCNetworkRangeIPv4IpVersion - return ret - } - - return o.IpVersion -} - -// GetIpVersionOk returns a tuple with the IpVersion field value -// and a boolean to check if the value has been set. -func (o *UpdateVPCNetworkRangePayload) GetIpVersionOk() (*V1UpdateVPCNetworkRangeIPv4IpVersion, bool) { - if o == nil { - return nil, false - } - return &o.IpVersion, true -} - -// SetIpVersion sets field value -func (o *UpdateVPCNetworkRangePayload) SetIpVersion(v V1UpdateVPCNetworkRangeIPv4IpVersion) { - o.IpVersion = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateVPCNetworkRangePayload) GetLabels() map[string]interface{} { - if o == nil || IsNil(o.Labels) { - var ret map[string]interface{} - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCNetworkRangePayload) GetLabelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Labels) { - return map[string]interface{}{}, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateVPCNetworkRangePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. -func (o *UpdateVPCNetworkRangePayload) SetLabels(v map[string]interface{}) { - o.Labels = v -} - -// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. -func (o *UpdateVPCNetworkRangePayload) GetMaxPrefixLen() int64 { - if o == nil || IsNil(o.MaxPrefixLen) { - var ret int64 - return ret - } - return *o.MaxPrefixLen -} - -// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCNetworkRangePayload) GetMaxPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MaxPrefixLen) { - return nil, false - } - return o.MaxPrefixLen, true -} - -// HasMaxPrefixLen returns a boolean if a field has been set. -func (o *UpdateVPCNetworkRangePayload) HasMaxPrefixLen() bool { - if o != nil && !IsNil(o.MaxPrefixLen) { - return true - } - - return false -} - -// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. -func (o *UpdateVPCNetworkRangePayload) SetMaxPrefixLen(v int64) { - o.MaxPrefixLen = &v -} - -// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. -func (o *UpdateVPCNetworkRangePayload) GetMinPrefixLen() int64 { - if o == nil || IsNil(o.MinPrefixLen) { - var ret int64 - return ret - } - return *o.MinPrefixLen -} - -// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCNetworkRangePayload) GetMinPrefixLenOk() (*int64, bool) { - if o == nil || IsNil(o.MinPrefixLen) { - return nil, false - } - return o.MinPrefixLen, true -} - -// HasMinPrefixLen returns a boolean if a field has been set. -func (o *UpdateVPCNetworkRangePayload) HasMinPrefixLen() bool { - if o != nil && !IsNil(o.MinPrefixLen) { - return true - } - - return false -} - -// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. -func (o *UpdateVPCNetworkRangePayload) SetMinPrefixLen(v int64) { - o.MinPrefixLen = &v -} - -// GetNameservers returns the Nameservers field value if set, zero value otherwise. -func (o *UpdateVPCNetworkRangePayload) GetNameservers() []string { - if o == nil || IsNil(o.Nameservers) { - var ret []string - return ret +// Unmarshal JSON data into one of the pointers in the struct +func (dst *UpdateVPCNetworkRangePayload) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'ipv4' + if jsonDict["ipVersion"] == "ipv4" { + // try to unmarshal JSON data into V1UpdateVPCNetworkRangeIPv4 + err = json.Unmarshal(data, &dst.V1UpdateVPCNetworkRangeIPv4) + if err == nil { + return nil // data stored in dst.V1UpdateVPCNetworkRangeIPv4, return on the first match + } else { + dst.V1UpdateVPCNetworkRangeIPv4 = nil + return fmt.Errorf("failed to unmarshal UpdateVPCNetworkRangePayload as V1UpdateVPCNetworkRangeIPv4: %s", err.Error()) + } } - return o.Nameservers -} -// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateVPCNetworkRangePayload) GetNameserversOk() ([]string, bool) { - if o == nil || IsNil(o.Nameservers) { - return nil, false - } - return o.Nameservers, true + return nil } -// HasNameservers returns a boolean if a field has been set. -func (o *UpdateVPCNetworkRangePayload) HasNameservers() bool { - if o != nil && !IsNil(o.Nameservers) { - return true +// Marshal data from the first non-nil pointers in the struct to JSON +func (src UpdateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { + if src.V1UpdateVPCNetworkRangeIPv4 != nil { + return json.Marshal(&src.V1UpdateVPCNetworkRangeIPv4) } - return false -} - -// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. -func (o *UpdateVPCNetworkRangePayload) SetNameservers(v []string) { - o.Nameservers = v -} - -func (o UpdateVPCNetworkRangePayload) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) + return nil, nil // no data in oneOf schemas } -func (o UpdateVPCNetworkRangePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DefaultPrefixLen) { - toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["ipVersion"] = o.IpVersion - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.MaxPrefixLen) { - toSerialize["maxPrefixLen"] = o.MaxPrefixLen - } - if !IsNil(o.MinPrefixLen) { - toSerialize["minPrefixLen"] = o.MinPrefixLen +// Get the actual instance +func (obj *UpdateVPCNetworkRangePayload) GetActualInstance() interface{} { + if obj == nil { + return nil } - if !IsNil(o.Nameservers) { - toSerialize["nameservers"] = o.Nameservers + if obj.V1UpdateVPCNetworkRangeIPv4 != nil { + return obj.V1UpdateVPCNetworkRangeIPv4 } - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil + // all schemas are nil + return nil } -func (o *UpdateVPCNetworkRangePayload) 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{ - "ipVersion", - } - - 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) - } - } - - varUpdateVPCNetworkRangePayload := _UpdateVPCNetworkRangePayload{} - - err = json.Unmarshal(data, &varUpdateVPCNetworkRangePayload) - - if err != nil { - return err - } - - *o = UpdateVPCNetworkRangePayload(varUpdateVPCNetworkRangePayload) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "defaultPrefixLen") - delete(additionalProperties, "description") - delete(additionalProperties, "ipVersion") - delete(additionalProperties, "labels") - delete(additionalProperties, "maxPrefixLen") - delete(additionalProperties, "minPrefixLen") - delete(additionalProperties, "nameservers") - o.AdditionalProperties = additionalProperties +// Get the actual instance value +func (obj UpdateVPCNetworkRangePayload) GetActualInstanceValue() interface{} { + if obj.V1UpdateVPCNetworkRangeIPv4 != nil { + return *obj.V1UpdateVPCNetworkRangeIPv4 } - return err + // all schemas are nil + return nil } type NullableUpdateVPCNetworkRangePayload struct { diff --git a/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go b/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go index 0dcacb762..40cdbce22 100644 --- a/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go +++ b/services/iaas/v2alpha1api/model_update_vpc_routing_table_payload.go @@ -27,7 +27,7 @@ type UpdateVPCRoutingTablePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2alpha1api/model_vpc.go b/services/iaas/v2alpha1api/model_vpc.go index bf056a49d..9163d47d8 100644 --- a/services/iaas/v2alpha1api/model_vpc.go +++ b/services/iaas/v2alpha1api/model_vpc.go @@ -31,7 +31,7 @@ type VPC struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ProjectId string `json:"projectId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Date-time when resource was last updated. diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go b/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go index bd455d2a1..f82d3ea72 100644 --- a/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go +++ b/services/iaas/v2alpha1api/model_vpc_network_range_ipv4.go @@ -44,7 +44,7 @@ type VPCNetworkRangeIPv4 struct { // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go b/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go index 46ff3d088..70a95c9f5 100644 --- a/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go +++ b/services/iaas/v2alpha1api/model_vpc_network_range_ipv6.go @@ -44,7 +44,7 @@ type VPCNetworkRangeIPv6 struct { // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2alpha1api/model_vpc_routing_table.go b/services/iaas/v2alpha1api/model_vpc_routing_table.go index 0c9eac803..99d33c336 100644 --- a/services/iaas/v2alpha1api/model_vpc_routing_table.go +++ b/services/iaas/v2alpha1api/model_vpc_routing_table.go @@ -33,7 +33,7 @@ type VPCRoutingTable struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2api/client.go b/services/iaas/v2api/client.go index b780cc045..c6a745760 100644 --- a/services/iaas/v2api/client.go +++ b/services/iaas/v2api/client.go @@ -462,6 +462,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if r, ok := v.(*io.Reader); ok { + *r = bytes.NewReader(b) + return nil + } + // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. + if p, ok := v.(*[]byte); ok { + *p = b + return nil + } if f, ok := v.(*os.File); ok { f, err = os.CreateTemp("", "HttpClientFile") if err != nil { diff --git a/services/iaas/v2api/model_add_routing_table_to_area_payload.go b/services/iaas/v2api/model_add_routing_table_to_area_payload.go index 9d6f82ec1..767bc2c2f 100644 --- a/services/iaas/v2api/model_add_routing_table_to_area_payload.go +++ b/services/iaas/v2api/model_add_routing_table_to_area_payload.go @@ -35,7 +35,7 @@ type AddRoutingTableToAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2api/model_affinity_group.go b/services/iaas/v2api/model_affinity_group.go index 6dcbf6184..d72bbf0ec 100644 --- a/services/iaas/v2api/model_affinity_group.go +++ b/services/iaas/v2api/model_affinity_group.go @@ -26,7 +26,7 @@ type AffinityGroup struct { // The servers that are part of the affinity group. Members []string `json:"members,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. Policy string `json:"policy"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_allowed_addresses_inner.go b/services/iaas/v2api/model_allowed_addresses_inner.go index da7ab7e48..f3b4d8d17 100644 --- a/services/iaas/v2api/model_allowed_addresses_inner.go +++ b/services/iaas/v2api/model_allowed_addresses_inner.go @@ -53,7 +53,11 @@ func (dst *AllowedAddressesInner) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") + } } } diff --git a/services/iaas/v2api/model_area_id.go b/services/iaas/v2api/model_area_id.go index 3c516b052..26dfd515f 100644 --- a/services/iaas/v2api/model_area_id.go +++ b/services/iaas/v2api/model_area_id.go @@ -14,6 +14,7 @@ package v2api import ( "encoding/json" "fmt" + "regexp" ) // AreaId - The identifier (ID) of an area. @@ -44,7 +45,8 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { err = json.Unmarshal(data, &dst.StaticAreaID) if err == nil { jsonStaticAreaID, _ := json.Marshal(dst.StaticAreaID) - if string(jsonStaticAreaID) == "{}" { // empty struct + // OVERRIDE: added expr after || + if string(jsonStaticAreaID) == "{}" || *dst.StaticAreaID == STATICAREAID_UNKNOWN_DEFAULT_OPEN_API { // empty struct or unknown fallback enum dst.StaticAreaID = nil } else { match++ @@ -57,10 +59,13 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { err = json.Unmarshal(data, &dst.String) if err == nil { jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { + // OVERRIDE: this pattern match is custom + regex := `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` + isMatched, _ := regexp.MatchString(regex, *dst.String) + if string(jsonString) != "{}" && isMatched { // empty struct match++ + } else { + dst.String = nil } } else { dst.String = nil @@ -75,7 +80,11 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(AreaId): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") + } } } diff --git a/services/iaas/v2api/model_backup.go b/services/iaas/v2api/model_backup.go index 30bdfed6b..14fb26f98 100644 --- a/services/iaas/v2api/model_backup.go +++ b/services/iaas/v2api/model_backup.go @@ -34,7 +34,7 @@ type Backup struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2api/model_base_security_group_rule.go b/services/iaas/v2api/model_base_security_group_rule.go index 852f4a72a..ea3df3da3 100644 --- a/services/iaas/v2api/model_base_security_group_rule.go +++ b/services/iaas/v2api/model_base_security_group_rule.go @@ -34,7 +34,7 @@ type BaseSecurityGroupRule struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v2api/model_boot_volume.go b/services/iaas/v2api/model_boot_volume.go index eb887d5c0..a5411fb8a 100644 --- a/services/iaas/v2api/model_boot_volume.go +++ b/services/iaas/v2api/model_boot_volume.go @@ -25,7 +25,7 @@ type BootVolume struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` Source *BootVolumeSource `json:"source,omitempty"` diff --git a/services/iaas/v2api/model_create_affinity_group_payload.go b/services/iaas/v2api/model_create_affinity_group_payload.go index fa9b0e57d..05d5706d3 100644 --- a/services/iaas/v2api/model_create_affinity_group_payload.go +++ b/services/iaas/v2api/model_create_affinity_group_payload.go @@ -26,7 +26,7 @@ type CreateAffinityGroupPayload struct { // The servers that are part of the affinity group. Members []string `json:"members,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. Policy string `json:"policy"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_create_backup_payload.go b/services/iaas/v2api/model_create_backup_payload.go index 0ba4591ca..212949362 100644 --- a/services/iaas/v2api/model_create_backup_payload.go +++ b/services/iaas/v2api/model_create_backup_payload.go @@ -26,7 +26,7 @@ type CreateBackupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` Source BackupSource `json:"source"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_create_image_payload.go b/services/iaas/v2api/model_create_image_payload.go index 6e0b827db..8cba972b8 100644 --- a/services/iaas/v2api/model_create_image_payload.go +++ b/services/iaas/v2api/model_create_image_payload.go @@ -40,7 +40,7 @@ type CreateImagePayload struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // When true the image is prevented from being deleted. diff --git a/services/iaas/v2api/model_create_isolated_network_payload.go b/services/iaas/v2api/model_create_isolated_network_payload.go index 22f79bd3c..79d4f6d4d 100644 --- a/services/iaas/v2api/model_create_isolated_network_payload.go +++ b/services/iaas/v2api/model_create_isolated_network_payload.go @@ -27,7 +27,7 @@ type CreateIsolatedNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_create_key_pair_payload.go b/services/iaas/v2api/model_create_key_pair_payload.go index ceb85933a..ac233ba84 100644 --- a/services/iaas/v2api/model_create_key_pair_payload.go +++ b/services/iaas/v2api/model_create_key_pair_payload.go @@ -31,7 +31,7 @@ type CreateKeyPairPayload struct { // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` // Object that represents a public SSH key. - PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\\\s+[A-Za-z0-9+\\/]+[=]{0,3}(\\\\s+.+)?\\\\s*$"` + PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\s+[A-Za-z0-9+/]+[=]{0\\,3}(\\s+.+)?\\s*$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_create_network_ipv4.go b/services/iaas/v2api/model_create_network_ipv4.go index 056a26741..00676f2ba 100644 --- a/services/iaas/v2api/model_create_network_ipv4.go +++ b/services/iaas/v2api/model_create_network_ipv4.go @@ -75,7 +75,16 @@ func (dst *CreateNetworkIPv4) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + } } } diff --git a/services/iaas/v2api/model_create_network_ipv4_with_prefix.go b/services/iaas/v2api/model_create_network_ipv4_with_prefix.go index ab65b7350..534c000f9 100644 --- a/services/iaas/v2api/model_create_network_ipv4_with_prefix.go +++ b/services/iaas/v2api/model_create_network_ipv4_with_prefix.go @@ -22,11 +22,11 @@ var _ MappedNullable = &CreateNetworkIPv4WithPrefix{} // CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix. type CreateNetworkIPv4WithPrefix struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` // IPv4 Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_create_network_ipv6.go b/services/iaas/v2api/model_create_network_ipv6.go index ca998e898..b1a99a858 100644 --- a/services/iaas/v2api/model_create_network_ipv6.go +++ b/services/iaas/v2api/model_create_network_ipv6.go @@ -75,7 +75,16 @@ func (dst *CreateNetworkIPv6) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + } } } diff --git a/services/iaas/v2api/model_create_network_ipv6_with_prefix.go b/services/iaas/v2api/model_create_network_ipv6_with_prefix.go index 95c451613..81f925f5e 100644 --- a/services/iaas/v2api/model_create_network_ipv6_with_prefix.go +++ b/services/iaas/v2api/model_create_network_ipv6_with_prefix.go @@ -22,11 +22,11 @@ var _ MappedNullable = &CreateNetworkIPv6WithPrefix{} // CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix. type CreateNetworkIPv6WithPrefix struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_create_network_payload.go b/services/iaas/v2api/model_create_network_payload.go index 75535ce6f..5e4a3b8a3 100644 --- a/services/iaas/v2api/model_create_network_payload.go +++ b/services/iaas/v2api/model_create_network_payload.go @@ -28,7 +28,7 @@ type CreateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2api/model_create_nic_payload.go b/services/iaas/v2api/model_create_nic_payload.go index cab2dd085..e6b0834a4 100644 --- a/services/iaas/v2api/model_create_nic_payload.go +++ b/services/iaas/v2api/model_create_nic_payload.go @@ -29,15 +29,15 @@ type CreateNicPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this network interface. diff --git a/services/iaas/v2api/model_create_protocol.go b/services/iaas/v2api/model_create_protocol.go index ecc0e0660..dcf74ccb7 100644 --- a/services/iaas/v2api/model_create_protocol.go +++ b/services/iaas/v2api/model_create_protocol.go @@ -75,7 +75,16 @@ func (dst *CreateProtocol) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + } } } diff --git a/services/iaas/v2api/model_create_public_ip_payload.go b/services/iaas/v2api/model_create_public_ip_payload.go index b69b4929f..770ff924a 100644 --- a/services/iaas/v2api/model_create_public_ip_payload.go +++ b/services/iaas/v2api/model_create_public_ip_payload.go @@ -23,7 +23,7 @@ type CreatePublicIPPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // String that represents an IPv4 address. - Ip *string `json:"ip,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v2api/model_create_security_group_payload.go b/services/iaas/v2api/model_create_security_group_payload.go index db8c276a4..db6317194 100644 --- a/services/iaas/v2api/model_create_security_group_payload.go +++ b/services/iaas/v2api/model_create_security_group_payload.go @@ -31,7 +31,7 @@ type CreateSecurityGroupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A list containing security group rule objects. Rules []SecurityGroupRule `json:"rules,omitempty"` // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. diff --git a/services/iaas/v2api/model_create_security_group_rule_payload.go b/services/iaas/v2api/model_create_security_group_rule_payload.go index 0249434dd..0b7438647 100644 --- a/services/iaas/v2api/model_create_security_group_rule_payload.go +++ b/services/iaas/v2api/model_create_security_group_rule_payload.go @@ -34,7 +34,7 @@ type CreateSecurityGroupRulePayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v2api/model_create_server_payload.go b/services/iaas/v2api/model_create_server_payload.go index 3cf6e82ef..8b0e12b35 100644 --- a/services/iaas/v2api/model_create_server_payload.go +++ b/services/iaas/v2api/model_create_server_payload.go @@ -45,12 +45,12 @@ type CreateServerPayload struct { // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` // Name of the machine type the server shall belong to. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` MaintenanceWindow *ServerMaintenance `json:"maintenanceWindow,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` Networking CreateServerPayloadAllOfNetworking `json:"networking"` // The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested. Nics []ServerNetwork `json:"nics,omitempty"` @@ -67,8 +67,7 @@ type CreateServerPayload struct { // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. Only shown when detailed information is requested. UserData *string `json:"userData,omitempty"` // The list of volumes attached to the server. - Volumes []string `json:"volumes,omitempty"` - Vtpm *ServerVTPM `json:"vtpm,omitempty"` + Volumes []string `json:"volumes,omitempty"` AdditionalProperties map[string]interface{} } @@ -874,38 +873,6 @@ func (o *CreateServerPayload) SetVolumes(v []string) { o.Volumes = v } -// GetVtpm returns the Vtpm field value if set, zero value otherwise. -func (o *CreateServerPayload) GetVtpm() ServerVTPM { - if o == nil || IsNil(o.Vtpm) { - var ret ServerVTPM - return ret - } - return *o.Vtpm -} - -// GetVtpmOk returns a tuple with the Vtpm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServerPayload) GetVtpmOk() (*ServerVTPM, bool) { - if o == nil || IsNil(o.Vtpm) { - return nil, false - } - return o.Vtpm, true -} - -// HasVtpm returns a boolean if a field has been set. -func (o *CreateServerPayload) HasVtpm() bool { - if o != nil && !IsNil(o.Vtpm) { - return true - } - - return false -} - -// SetVtpm gets a reference to the given ServerVTPM and assigns it to the Vtpm field. -func (o *CreateServerPayload) SetVtpm(v ServerVTPM) { - o.Vtpm = &v -} - func (o CreateServerPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -985,9 +952,6 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Volumes) { toSerialize["volumes"] = o.Volumes } - if !IsNil(o.Vtpm) { - toSerialize["vtpm"] = o.Vtpm - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1058,7 +1022,6 @@ func (o *CreateServerPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "updatedAt") delete(additionalProperties, "userData") delete(additionalProperties, "volumes") - delete(additionalProperties, "vtpm") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_create_server_payload_all_of_networking.go b/services/iaas/v2api/model_create_server_payload_all_of_networking.go index fe8dad0cf..5ce0523a4 100644 --- a/services/iaas/v2api/model_create_server_payload_all_of_networking.go +++ b/services/iaas/v2api/model_create_server_payload_all_of_networking.go @@ -75,7 +75,16 @@ func (dst *CreateServerPayloadAllOfNetworking) UnmarshalJSON(data []byte) error } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") + } } } diff --git a/services/iaas/v2api/model_create_snapshot_payload.go b/services/iaas/v2api/model_create_snapshot_payload.go index 046575deb..142601f29 100644 --- a/services/iaas/v2api/model_create_snapshot_payload.go +++ b/services/iaas/v2api/model_create_snapshot_payload.go @@ -33,7 +33,7 @@ type CreateSnapshotPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. diff --git a/services/iaas/v2api/model_create_volume_payload.go b/services/iaas/v2api/model_create_volume_payload.go index 1a0046325..52ddf21f6 100644 --- a/services/iaas/v2api/model_create_volume_payload.go +++ b/services/iaas/v2api/model_create_volume_payload.go @@ -39,9 +39,9 @@ type CreateVolumePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ServerId *string `json:"serverId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Size in Gigabyte. diff --git a/services/iaas/v2api/model_destination_cidrv4.go b/services/iaas/v2api/model_destination_cidrv4.go index ac1d939d5..32f9ac9c2 100644 --- a/services/iaas/v2api/model_destination_cidrv4.go +++ b/services/iaas/v2api/model_destination_cidrv4.go @@ -23,7 +23,7 @@ var _ MappedNullable = &DestinationCIDRv4{} type DestinationCIDRv4 struct { Type string `json:"type"` // An CIDRv4 string. - Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_destination_cidrv6.go b/services/iaas/v2api/model_destination_cidrv6.go index 5d7377545..c7addf72a 100644 --- a/services/iaas/v2api/model_destination_cidrv6.go +++ b/services/iaas/v2api/model_destination_cidrv6.go @@ -23,7 +23,7 @@ var _ MappedNullable = &DestinationCIDRv6{} type DestinationCIDRv6 struct { Type string `json:"type"` // An CIDRv6 string. - Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_image.go b/services/iaas/v2api/model_image.go index 7964679f9..477d03308 100644 --- a/services/iaas/v2api/model_image.go +++ b/services/iaas/v2api/model_image.go @@ -40,7 +40,7 @@ type Image struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // When true the image is prevented from being deleted. diff --git a/services/iaas/v2api/model_image_from_volume_payload.go b/services/iaas/v2api/model_image_from_volume_payload.go index f9d17bc1c..37a050e19 100644 --- a/services/iaas/v2api/model_image_from_volume_payload.go +++ b/services/iaas/v2api/model_image_from_volume_payload.go @@ -24,7 +24,7 @@ type ImageFromVolumePayload struct { // Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`. DiskFormat string `json:"diskFormat"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // When true the created image is prevented from being deleted. Protected *bool `json:"protected,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_keypair.go b/services/iaas/v2api/model_keypair.go index ae0b6b87b..9ffa9462f 100644 --- a/services/iaas/v2api/model_keypair.go +++ b/services/iaas/v2api/model_keypair.go @@ -31,7 +31,7 @@ type Keypair struct { // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` // Object that represents a public SSH key. - PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\\\s+[A-Za-z0-9+\\/]+[=]{0,3}(\\\\s+.+)?\\\\s*$"` + PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\s+[A-Za-z0-9+/]+[=]{0\\,3}(\\s+.+)?\\s*$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_machine_type.go b/services/iaas/v2api/model_machine_type.go index cbb003672..ae938dc2c 100644 --- a/services/iaas/v2api/model_machine_type.go +++ b/services/iaas/v2api/model_machine_type.go @@ -28,7 +28,7 @@ type MachineType struct { // Properties to control certain aspects or scheduling behavior for an object. ExtraSpecs map[string]interface{} `json:"extraSpecs,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Megabyte. Ram int64 `json:"ram"` // The number of virtual CPUs of a server. diff --git a/services/iaas/v2api/model_network_ipv4.go b/services/iaas/v2api/model_network_ipv4.go index e7510eeee..290f37cc9 100644 --- a/services/iaas/v2api/model_network_ipv4.go +++ b/services/iaas/v2api/model_network_ipv4.go @@ -22,12 +22,12 @@ var _ MappedNullable = &NetworkIPv4{} // NetworkIPv4 Object that represents the IPv4 part of a network. type NetworkIPv4 struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` Prefixes []string `json:"prefixes"` // String that represents an IPv4 address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_network_ipv6.go b/services/iaas/v2api/model_network_ipv6.go index 94ba8698d..c333d6da2 100644 --- a/services/iaas/v2api/model_network_ipv6.go +++ b/services/iaas/v2api/model_network_ipv6.go @@ -22,7 +22,7 @@ var _ MappedNullable = &NetworkIPv6{} // NetworkIPv6 Object that represents the IPv6 part of a network. type NetworkIPv6 struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` Prefixes []string `json:"prefixes"` diff --git a/services/iaas/v2api/model_network_range.go b/services/iaas/v2api/model_network_range.go index 8f443f3d2..d6f766ddf 100644 --- a/services/iaas/v2api/model_network_range.go +++ b/services/iaas/v2api/model_network_range.go @@ -27,7 +27,7 @@ type NetworkRange struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_nexthop_ipv4.go b/services/iaas/v2api/model_nexthop_ipv4.go index 39d788b66..dc849302f 100644 --- a/services/iaas/v2api/model_nexthop_ipv4.go +++ b/services/iaas/v2api/model_nexthop_ipv4.go @@ -23,7 +23,7 @@ var _ MappedNullable = &NexthopIPv4{} type NexthopIPv4 struct { Type string `json:"type"` // An IPv4 address. - Value string `json:"value" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Value string `json:"value" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_nexthop_ipv6.go b/services/iaas/v2api/model_nexthop_ipv6.go index a4d8957db..e19ad5444 100644 --- a/services/iaas/v2api/model_nexthop_ipv6.go +++ b/services/iaas/v2api/model_nexthop_ipv6.go @@ -23,7 +23,7 @@ var _ MappedNullable = &NexthopIPv6{} type NexthopIPv6 struct { Type string `json:"type"` // An IPv6 address. - Value string `json:"value" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Value string `json:"value" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_nic.go b/services/iaas/v2api/model_nic.go index 4238a76f3..a3223ee07 100644 --- a/services/iaas/v2api/model_nic.go +++ b/services/iaas/v2api/model_nic.go @@ -29,15 +29,15 @@ type NIC struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this network interface. diff --git a/services/iaas/v2api/model_partial_update_network_payload.go b/services/iaas/v2api/model_partial_update_network_payload.go index e59655419..9afce2bbb 100644 --- a/services/iaas/v2api/model_partial_update_network_payload.go +++ b/services/iaas/v2api/model_partial_update_network_payload.go @@ -27,7 +27,7 @@ type PartialUpdateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2api/model_public_ip.go b/services/iaas/v2api/model_public_ip.go index 900198d41..c7ed4b5ef 100644 --- a/services/iaas/v2api/model_public_ip.go +++ b/services/iaas/v2api/model_public_ip.go @@ -23,7 +23,7 @@ type PublicIp struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // String that represents an IPv4 address. - Ip *string `json:"ip,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v2api/model_public_network.go b/services/iaas/v2api/model_public_network.go index fdeb82769..84950ccf6 100644 --- a/services/iaas/v2api/model_public_network.go +++ b/services/iaas/v2api/model_public_network.go @@ -22,7 +22,7 @@ var _ MappedNullable = &PublicNetwork{} // PublicNetwork Public network. type PublicNetwork struct { // Classless Inter-Domain Routing (CIDR). - Cidr string `json:"cidr" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Cidr string `json:"cidr" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Name of the region. Region string `json:"region"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_regional_area_ipv4.go b/services/iaas/v2api/model_regional_area_ipv4.go index 9fbce0132..621d42ec9 100644 --- a/services/iaas/v2api/model_regional_area_ipv4.go +++ b/services/iaas/v2api/model_regional_area_ipv4.go @@ -31,7 +31,7 @@ type RegionalAreaIPv4 struct { // A list of network area network ranges. NetworkRanges []NetworkRange `json:"networkRanges"` // IPv4 Classless Inter-Domain Routing (CIDR). - TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_resize_server_payload.go b/services/iaas/v2api/model_resize_server_payload.go index 27e7351d5..b89e5b836 100644 --- a/services/iaas/v2api/model_resize_server_payload.go +++ b/services/iaas/v2api/model_resize_server_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &ResizeServerPayload{} // ResizeServerPayload struct for ResizeServerPayload type ResizeServerPayload struct { // The name for a General Object. Matches Names and also UUIDs. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_routing_table.go b/services/iaas/v2api/model_routing_table.go index ec2e2ad33..e4006a546 100644 --- a/services/iaas/v2api/model_routing_table.go +++ b/services/iaas/v2api/model_routing_table.go @@ -35,7 +35,7 @@ type RoutingTable struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2api/model_security_group.go b/services/iaas/v2api/model_security_group.go index bafc07c37..7354b0b40 100644 --- a/services/iaas/v2api/model_security_group.go +++ b/services/iaas/v2api/model_security_group.go @@ -31,7 +31,7 @@ type SecurityGroup struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A list containing security group rule objects. Rules []SecurityGroupRule `json:"rules,omitempty"` // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. diff --git a/services/iaas/v2api/model_security_group_rule.go b/services/iaas/v2api/model_security_group_rule.go index e743df657..71eaa4bf8 100644 --- a/services/iaas/v2api/model_security_group_rule.go +++ b/services/iaas/v2api/model_security_group_rule.go @@ -34,7 +34,7 @@ type SecurityGroupRule struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v2api/model_server.go b/services/iaas/v2api/model_server.go index f4b40cb6d..5b17f6a00 100644 --- a/services/iaas/v2api/model_server.go +++ b/services/iaas/v2api/model_server.go @@ -45,12 +45,12 @@ type Server struct { // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` // Name of the machine type the server shall belong to. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` MaintenanceWindow *ServerMaintenance `json:"maintenanceWindow,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` Networking *ServerNetworking `json:"networking,omitempty"` // The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested. Nics []ServerNetwork `json:"nics,omitempty"` @@ -67,8 +67,7 @@ type Server struct { // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. Only shown when detailed information is requested. UserData *string `json:"userData,omitempty"` // The list of volumes attached to the server. - Volumes []string `json:"volumes,omitempty"` - Vtpm *ServerVTPM `json:"vtpm,omitempty"` + Volumes []string `json:"volumes,omitempty"` AdditionalProperties map[string]interface{} } @@ -881,38 +880,6 @@ func (o *Server) SetVolumes(v []string) { o.Volumes = v } -// GetVtpm returns the Vtpm field value if set, zero value otherwise. -func (o *Server) GetVtpm() ServerVTPM { - if o == nil || IsNil(o.Vtpm) { - var ret ServerVTPM - return ret - } - return *o.Vtpm -} - -// GetVtpmOk returns a tuple with the Vtpm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Server) GetVtpmOk() (*ServerVTPM, bool) { - if o == nil || IsNil(o.Vtpm) { - return nil, false - } - return o.Vtpm, true -} - -// HasVtpm returns a boolean if a field has been set. -func (o *Server) HasVtpm() bool { - if o != nil && !IsNil(o.Vtpm) { - return true - } - - return false -} - -// SetVtpm gets a reference to the given ServerVTPM and assigns it to the Vtpm field. -func (o *Server) SetVtpm(v ServerVTPM) { - o.Vtpm = &v -} - func (o Server) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -994,9 +961,6 @@ func (o Server) ToMap() (map[string]interface{}, error) { if !IsNil(o.Volumes) { toSerialize["volumes"] = o.Volumes } - if !IsNil(o.Vtpm) { - toSerialize["vtpm"] = o.Vtpm - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1066,7 +1030,6 @@ func (o *Server) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "updatedAt") delete(additionalProperties, "userData") delete(additionalProperties, "volumes") - delete(additionalProperties, "vtpm") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2api/model_server_network.go b/services/iaas/v2api/model_server_network.go index 123d9a77c..cca8e40e6 100644 --- a/services/iaas/v2api/model_server_network.go +++ b/services/iaas/v2api/model_server_network.go @@ -24,21 +24,21 @@ type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents an MAC address. Mac string `json:"mac" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // Universally Unique Identifier (UUID). NetworkId string `json:"networkId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The name for a General Object. Matches Names and also UUIDs. - NetworkName string `json:"networkName" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + NetworkName string `json:"networkName" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NicId string `json:"nicId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this server network interface. NicSecurity bool `json:"nicSecurity"` // Object that represents an IP address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list of UUIDs. SecurityGroups []string `json:"securityGroups,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_server_networking.go b/services/iaas/v2api/model_server_networking.go index 3b6a39839..08cae0b7d 100644 --- a/services/iaas/v2api/model_server_networking.go +++ b/services/iaas/v2api/model_server_networking.go @@ -75,7 +75,16 @@ func (dst *ServerNetworking) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + } } } diff --git a/services/iaas/v2api/model_server_vtpm.go b/services/iaas/v2api/model_server_vtpm.go deleted file mode 100644 index b2549e72b..000000000 --- a/services/iaas/v2api/model_server_vtpm.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// checks if the ServerVTPM type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerVTPM{} - -// ServerVTPM Configuration for the Virtual Trusted Platform Module (vTPM). -type ServerVTPM struct { - // Defines whether the server instance has the Virtual Trusted Platform Module (vTPM) enabled. - Enabled bool `json:"enabled"` - AdditionalProperties map[string]interface{} -} - -type _ServerVTPM ServerVTPM - -// NewServerVTPM instantiates a new ServerVTPM 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 NewServerVTPM(enabled bool) *ServerVTPM { - this := ServerVTPM{} - this.Enabled = enabled - return &this -} - -// NewServerVTPMWithDefaults instantiates a new ServerVTPM 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 NewServerVTPMWithDefaults() *ServerVTPM { - this := ServerVTPM{} - var enabled bool = false - this.Enabled = enabled - return &this -} - -// GetEnabled returns the Enabled field value -func (o *ServerVTPM) GetEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -func (o *ServerVTPM) GetEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Enabled, true -} - -// SetEnabled sets field value -func (o *ServerVTPM) SetEnabled(v bool) { - o.Enabled = v -} - -func (o ServerVTPM) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ServerVTPM) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["enabled"] = o.Enabled - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ServerVTPM) 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{ - "enabled", - } - - 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) - } - } - - varServerVTPM := _ServerVTPM{} - - err = json.Unmarshal(data, &varServerVTPM) - - if err != nil { - return err - } - - *o = ServerVTPM(varServerVTPM) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "enabled") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableServerVTPM struct { - value *ServerVTPM - isSet bool -} - -func (v NullableServerVTPM) Get() *ServerVTPM { - return v.value -} - -func (v *NullableServerVTPM) Set(val *ServerVTPM) { - v.value = val - v.isSet = true -} - -func (v NullableServerVTPM) IsSet() bool { - return v.isSet -} - -func (v *NullableServerVTPM) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServerVTPM(val *ServerVTPM) *NullableServerVTPM { - return &NullableServerVTPM{value: val, isSet: true} -} - -func (v NullableServerVTPM) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServerVTPM) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2api/model_snapshot.go b/services/iaas/v2api/model_snapshot.go index 22ec73aa6..ddd57223e 100644 --- a/services/iaas/v2api/model_snapshot.go +++ b/services/iaas/v2api/model_snapshot.go @@ -33,7 +33,7 @@ type Snapshot struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. diff --git a/services/iaas/v2api/model_update_backup_payload.go b/services/iaas/v2api/model_update_backup_payload.go index 366cd0ce4..a69c908b9 100644 --- a/services/iaas/v2api/model_update_backup_payload.go +++ b/services/iaas/v2api/model_update_backup_payload.go @@ -34,7 +34,7 @@ type UpdateBackupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2api/model_update_image_payload.go b/services/iaas/v2api/model_update_image_payload.go index 18c97d3da..e0677681f 100644 --- a/services/iaas/v2api/model_update_image_payload.go +++ b/services/iaas/v2api/model_update_image_payload.go @@ -31,7 +31,7 @@ type UpdateImagePayload struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // When true the image is prevented from being deleted. Protected *bool `json:"protected,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_update_network_ipv4_body.go b/services/iaas/v2api/model_update_network_ipv4_body.go index 9e30da335..6ce11816e 100644 --- a/services/iaas/v2api/model_update_network_ipv4_body.go +++ b/services/iaas/v2api/model_update_network_ipv4_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv4Body{} // UpdateNetworkIPv4Body The config object for a IPv4 network update. type UpdateNetworkIPv4Body struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_update_network_ipv6_body.go b/services/iaas/v2api/model_update_network_ipv6_body.go index 64bc5486b..71da517f2 100644 --- a/services/iaas/v2api/model_update_network_ipv6_body.go +++ b/services/iaas/v2api/model_update_network_ipv6_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv6Body{} // UpdateNetworkIPv6Body The config object for a IPv6 network update. type UpdateNetworkIPv6Body struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_update_nic_payload.go b/services/iaas/v2api/model_update_nic_payload.go index 18f449aa0..3fe2c2b18 100644 --- a/services/iaas/v2api/model_update_nic_payload.go +++ b/services/iaas/v2api/model_update_nic_payload.go @@ -27,7 +27,7 @@ type UpdateNicPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // If this is set to false, then no security groups will apply to this network interface. NicSecurity *bool `json:"nicSecurity,omitempty"` // A list of UUIDs. diff --git a/services/iaas/v2api/model_update_public_ip_payload.go b/services/iaas/v2api/model_update_public_ip_payload.go index 0411e752a..f958b972b 100644 --- a/services/iaas/v2api/model_update_public_ip_payload.go +++ b/services/iaas/v2api/model_update_public_ip_payload.go @@ -23,7 +23,7 @@ type UpdatePublicIPPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // String that represents an IPv4 address. - Ip *string `json:"ip,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v2api/model_update_routing_table_of_area_payload.go b/services/iaas/v2api/model_update_routing_table_of_area_payload.go index acadf118b..e90608dd8 100644 --- a/services/iaas/v2api/model_update_routing_table_of_area_payload.go +++ b/services/iaas/v2api/model_update_routing_table_of_area_payload.go @@ -27,7 +27,7 @@ type UpdateRoutingTableOfAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2api/model_update_security_group_payload.go b/services/iaas/v2api/model_update_security_group_payload.go index 459706a36..f67bb93c5 100644 --- a/services/iaas/v2api/model_update_security_group_payload.go +++ b/services/iaas/v2api/model_update_security_group_payload.go @@ -25,7 +25,7 @@ type UpdateSecurityGroupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_update_server_payload.go b/services/iaas/v2api/model_update_server_payload.go index dd0119584..213e54af4 100644 --- a/services/iaas/v2api/model_update_server_payload.go +++ b/services/iaas/v2api/model_update_server_payload.go @@ -25,7 +25,7 @@ type UpdateServerPayload struct { // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name *string `json:"name,omitempty" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name *string `json:"name,omitempty" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_update_snapshot_payload.go b/services/iaas/v2api/model_update_snapshot_payload.go index 46e43dbee..aea613daf 100644 --- a/services/iaas/v2api/model_update_snapshot_payload.go +++ b/services/iaas/v2api/model_update_snapshot_payload.go @@ -25,7 +25,7 @@ type UpdateSnapshotPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_update_volume_payload.go b/services/iaas/v2api/model_update_volume_payload.go index 85fc8a4dd..dd1b48752 100644 --- a/services/iaas/v2api/model_update_volume_payload.go +++ b/services/iaas/v2api/model_update_volume_payload.go @@ -28,7 +28,7 @@ type UpdateVolumePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_volume.go b/services/iaas/v2api/model_volume.go index 3a3187be3..f476f4522 100644 --- a/services/iaas/v2api/model_volume.go +++ b/services/iaas/v2api/model_volume.go @@ -39,9 +39,9 @@ type Volume struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ServerId *string `json:"serverId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Size in Gigabyte. diff --git a/services/iaas/v2api/model_volume_encryption_parameter.go b/services/iaas/v2api/model_volume_encryption_parameter.go index b30da4419..60687851d 100644 --- a/services/iaas/v2api/model_volume_encryption_parameter.go +++ b/services/iaas/v2api/model_volume_encryption_parameter.go @@ -32,7 +32,7 @@ type VolumeEncryptionParameter struct { // Optional predefined secret, which will be encrypted against the key-encryption-key within the STACKIT-KMS. If not defined, a random secret will be generated by the API and encrypted against the STACKIT-KMS. If a key-payload is provided here, it must be base64 encoded. KeyPayload *string `json:"keyPayload,omitempty"` // Service-Account linked to the Key within the STACKIT-KMS. - ServiceAccount string `json:"serviceAccount" validate:"regexp=[a-z0-9-]+(?:\\\\.[a-z0-9]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"` + ServiceAccount string `json:"serviceAccount" validate:"regexp=[a-z0-9-]+(?:\\.[a-z0-9]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2api/model_volume_performance_class.go b/services/iaas/v2api/model_volume_performance_class.go index d27b61caa..fa4c4c1c7 100644 --- a/services/iaas/v2api/model_volume_performance_class.go +++ b/services/iaas/v2api/model_volume_performance_class.go @@ -28,7 +28,7 @@ type VolumePerformanceClass struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Throughput in Megabyte per second. Throughput *int64 `json:"throughput,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/client.go b/services/iaas/v2beta1api/client.go index f38d095b0..e32268ab1 100644 --- a/services/iaas/v2beta1api/client.go +++ b/services/iaas/v2beta1api/client.go @@ -462,6 +462,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if r, ok := v.(*io.Reader); ok { + *r = bytes.NewReader(b) + return nil + } + // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. + if p, ok := v.(*[]byte); ok { + *p = b + return nil + } if f, ok := v.(*os.File); ok { f, err = os.CreateTemp("", "HttpClientFile") if err != nil { diff --git a/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go b/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go index 14fa2ae54..a85cb8cad 100644 --- a/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go +++ b/services/iaas/v2beta1api/model_add_routing_table_to_area_payload.go @@ -35,7 +35,7 @@ type AddRoutingTableToAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2beta1api/model_affinity_group.go b/services/iaas/v2beta1api/model_affinity_group.go index 47093bfc9..668fdfeaa 100644 --- a/services/iaas/v2beta1api/model_affinity_group.go +++ b/services/iaas/v2beta1api/model_affinity_group.go @@ -26,7 +26,7 @@ type AffinityGroup struct { // The servers that are part of the affinity group. Members []string `json:"members,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. Policy string `json:"policy"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_allowed_addresses_inner.go b/services/iaas/v2beta1api/model_allowed_addresses_inner.go index af2f669e2..2fe2dbf9b 100644 --- a/services/iaas/v2beta1api/model_allowed_addresses_inner.go +++ b/services/iaas/v2beta1api/model_allowed_addresses_inner.go @@ -53,7 +53,11 @@ func (dst *AllowedAddressesInner) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)") + } } } diff --git a/services/iaas/v2beta1api/model_area_id.go b/services/iaas/v2beta1api/model_area_id.go index 938c9d001..6c6a45ada 100644 --- a/services/iaas/v2beta1api/model_area_id.go +++ b/services/iaas/v2beta1api/model_area_id.go @@ -14,6 +14,7 @@ package v2beta1api import ( "encoding/json" "fmt" + "regexp" ) // AreaId - The identifier (ID) of an area. @@ -44,7 +45,8 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { err = json.Unmarshal(data, &dst.StaticAreaID) if err == nil { jsonStaticAreaID, _ := json.Marshal(dst.StaticAreaID) - if string(jsonStaticAreaID) == "{}" { // empty struct + // OVERRIDE: added expr after || + if string(jsonStaticAreaID) == "{}" || *dst.StaticAreaID == STATICAREAID_UNKNOWN_DEFAULT_OPEN_API { // empty struct or unknown fallback enum dst.StaticAreaID = nil } else { match++ @@ -57,10 +59,13 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { err = json.Unmarshal(data, &dst.String) if err == nil { jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { + // OVERRIDE: this pattern match is custom + regex := `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` + isMatched, _ := regexp.MatchString(regex, *dst.String) + if string(jsonString) != "{}" && isMatched { // empty struct match++ + } else { + dst.String = nil } } else { dst.String = nil @@ -75,7 +80,11 @@ func (dst *AreaId) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(AreaId): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(AreaId)") + } } } diff --git a/services/iaas/v2beta1api/model_backup.go b/services/iaas/v2beta1api/model_backup.go index 8a5325e9c..fa9c9f200 100644 --- a/services/iaas/v2beta1api/model_backup.go +++ b/services/iaas/v2beta1api/model_backup.go @@ -34,7 +34,7 @@ type Backup struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2beta1api/model_base_security_group_rule.go b/services/iaas/v2beta1api/model_base_security_group_rule.go index 89250822c..5fa9ece91 100644 --- a/services/iaas/v2beta1api/model_base_security_group_rule.go +++ b/services/iaas/v2beta1api/model_base_security_group_rule.go @@ -34,7 +34,7 @@ type BaseSecurityGroupRule struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v2beta1api/model_boot_volume.go b/services/iaas/v2beta1api/model_boot_volume.go index 8b2a135be..157a671c9 100644 --- a/services/iaas/v2beta1api/model_boot_volume.go +++ b/services/iaas/v2beta1api/model_boot_volume.go @@ -25,7 +25,7 @@ type BootVolume struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` Source *BootVolumeSource `json:"source,omitempty"` diff --git a/services/iaas/v2beta1api/model_create_affinity_group_payload.go b/services/iaas/v2beta1api/model_create_affinity_group_payload.go index ce1f4523a..fc565f4e9 100644 --- a/services/iaas/v2beta1api/model_create_affinity_group_payload.go +++ b/services/iaas/v2beta1api/model_create_affinity_group_payload.go @@ -26,7 +26,7 @@ type CreateAffinityGroupPayload struct { // The servers that are part of the affinity group. Members []string `json:"members,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`. Policy string `json:"policy"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_create_backup_payload.go b/services/iaas/v2beta1api/model_create_backup_payload.go index 33f371d74..3324aac64 100644 --- a/services/iaas/v2beta1api/model_create_backup_payload.go +++ b/services/iaas/v2beta1api/model_create_backup_payload.go @@ -26,7 +26,7 @@ type CreateBackupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` Source BackupSource `json:"source"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_create_image_payload.go b/services/iaas/v2beta1api/model_create_image_payload.go index 55e79df1f..5b9866790 100644 --- a/services/iaas/v2beta1api/model_create_image_payload.go +++ b/services/iaas/v2beta1api/model_create_image_payload.go @@ -40,7 +40,7 @@ type CreateImagePayload struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // When true the image is prevented from being deleted. diff --git a/services/iaas/v2beta1api/model_create_isolated_network_payload.go b/services/iaas/v2beta1api/model_create_isolated_network_payload.go index 8589b2155..9c5f8abd9 100644 --- a/services/iaas/v2beta1api/model_create_isolated_network_payload.go +++ b/services/iaas/v2beta1api/model_create_isolated_network_payload.go @@ -27,7 +27,7 @@ type CreateIsolatedNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_create_key_pair_payload.go b/services/iaas/v2beta1api/model_create_key_pair_payload.go index 397f8ec84..441f5466d 100644 --- a/services/iaas/v2beta1api/model_create_key_pair_payload.go +++ b/services/iaas/v2beta1api/model_create_key_pair_payload.go @@ -31,7 +31,7 @@ type CreateKeyPairPayload struct { // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` // Object that represents a public SSH key. - PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\\\s+[A-Za-z0-9+\\/]+[=]{0,3}(\\\\s+.+)?\\\\s*$"` + PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\s+[A-Za-z0-9+/]+[=]{0\\,3}(\\s+.+)?\\s*$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_create_network_ipv4.go b/services/iaas/v2beta1api/model_create_network_ipv4.go index 0d9d3916e..99bd7cc19 100644 --- a/services/iaas/v2beta1api/model_create_network_ipv4.go +++ b/services/iaas/v2beta1api/model_create_network_ipv4.go @@ -75,7 +75,16 @@ func (dst *CreateNetworkIPv4) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)") + } } } diff --git a/services/iaas/v2beta1api/model_create_network_ipv4_with_prefix.go b/services/iaas/v2beta1api/model_create_network_ipv4_with_prefix.go index 59753f75a..c9acff88e 100644 --- a/services/iaas/v2beta1api/model_create_network_ipv4_with_prefix.go +++ b/services/iaas/v2beta1api/model_create_network_ipv4_with_prefix.go @@ -22,11 +22,11 @@ var _ MappedNullable = &CreateNetworkIPv4WithPrefix{} // CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix. type CreateNetworkIPv4WithPrefix struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` // IPv4 Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_create_network_ipv6.go b/services/iaas/v2beta1api/model_create_network_ipv6.go index 6f00fbd04..07e0ccb0f 100644 --- a/services/iaas/v2beta1api/model_create_network_ipv6.go +++ b/services/iaas/v2beta1api/model_create_network_ipv6.go @@ -75,7 +75,16 @@ func (dst *CreateNetworkIPv6) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)") + } } } diff --git a/services/iaas/v2beta1api/model_create_network_ipv6_with_prefix.go b/services/iaas/v2beta1api/model_create_network_ipv6_with_prefix.go index 97ece8870..d16d3c6e9 100644 --- a/services/iaas/v2beta1api/model_create_network_ipv6_with_prefix.go +++ b/services/iaas/v2beta1api/model_create_network_ipv6_with_prefix.go @@ -22,11 +22,11 @@ var _ MappedNullable = &CreateNetworkIPv6WithPrefix{} // CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix. type CreateNetworkIPv6WithPrefix struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR) for IPv6. - Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_create_network_payload.go b/services/iaas/v2beta1api/model_create_network_payload.go index e9579317a..14c786310 100644 --- a/services/iaas/v2beta1api/model_create_network_payload.go +++ b/services/iaas/v2beta1api/model_create_network_payload.go @@ -28,7 +28,7 @@ type CreateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2beta1api/model_create_nic_payload.go b/services/iaas/v2beta1api/model_create_nic_payload.go index 88bdc2b09..b4db30f18 100644 --- a/services/iaas/v2beta1api/model_create_nic_payload.go +++ b/services/iaas/v2beta1api/model_create_nic_payload.go @@ -29,15 +29,15 @@ type CreateNicPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this network interface. diff --git a/services/iaas/v2beta1api/model_create_protocol.go b/services/iaas/v2beta1api/model_create_protocol.go index e75ec213a..2c3479569 100644 --- a/services/iaas/v2beta1api/model_create_protocol.go +++ b/services/iaas/v2beta1api/model_create_protocol.go @@ -75,7 +75,16 @@ func (dst *CreateProtocol) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)") + } } } diff --git a/services/iaas/v2beta1api/model_create_public_ip_payload.go b/services/iaas/v2beta1api/model_create_public_ip_payload.go index a0bed20df..cf56270c7 100644 --- a/services/iaas/v2beta1api/model_create_public_ip_payload.go +++ b/services/iaas/v2beta1api/model_create_public_ip_payload.go @@ -23,7 +23,7 @@ type CreatePublicIPPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // String that represents an IPv4 address. - Ip *string `json:"ip,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v2beta1api/model_create_security_group_payload.go b/services/iaas/v2beta1api/model_create_security_group_payload.go index f1989cf8d..f98e58b47 100644 --- a/services/iaas/v2beta1api/model_create_security_group_payload.go +++ b/services/iaas/v2beta1api/model_create_security_group_payload.go @@ -31,7 +31,7 @@ type CreateSecurityGroupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A list containing security group rule objects. Rules []SecurityGroupRule `json:"rules,omitempty"` // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. diff --git a/services/iaas/v2beta1api/model_create_security_group_rule_payload.go b/services/iaas/v2beta1api/model_create_security_group_rule_payload.go index 461d2ba8b..84e7c06bb 100644 --- a/services/iaas/v2beta1api/model_create_security_group_rule_payload.go +++ b/services/iaas/v2beta1api/model_create_security_group_rule_payload.go @@ -34,7 +34,7 @@ type CreateSecurityGroupRulePayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v2beta1api/model_create_server_payload.go b/services/iaas/v2beta1api/model_create_server_payload.go index e3067d20d..9dbcb4a8f 100644 --- a/services/iaas/v2beta1api/model_create_server_payload.go +++ b/services/iaas/v2beta1api/model_create_server_payload.go @@ -45,12 +45,12 @@ type CreateServerPayload struct { // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` // Name of the machine type the server shall belong to. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` MaintenanceWindow *ServerMaintenance `json:"maintenanceWindow,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` Networking CreateServerPayloadAllOfNetworking `json:"networking"` // The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested. Nics []ServerNetwork `json:"nics,omitempty"` @@ -67,8 +67,7 @@ type CreateServerPayload struct { // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. Only shown when detailed information is requested. UserData *string `json:"userData,omitempty"` // The list of volumes attached to the server. - Volumes []string `json:"volumes,omitempty"` - Vtpm *ServerVTPM `json:"vtpm,omitempty"` + Volumes []string `json:"volumes,omitempty"` AdditionalProperties map[string]interface{} } @@ -874,38 +873,6 @@ func (o *CreateServerPayload) SetVolumes(v []string) { o.Volumes = v } -// GetVtpm returns the Vtpm field value if set, zero value otherwise. -func (o *CreateServerPayload) GetVtpm() ServerVTPM { - if o == nil || IsNil(o.Vtpm) { - var ret ServerVTPM - return ret - } - return *o.Vtpm -} - -// GetVtpmOk returns a tuple with the Vtpm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServerPayload) GetVtpmOk() (*ServerVTPM, bool) { - if o == nil || IsNil(o.Vtpm) { - return nil, false - } - return o.Vtpm, true -} - -// HasVtpm returns a boolean if a field has been set. -func (o *CreateServerPayload) HasVtpm() bool { - if o != nil && !IsNil(o.Vtpm) { - return true - } - - return false -} - -// SetVtpm gets a reference to the given ServerVTPM and assigns it to the Vtpm field. -func (o *CreateServerPayload) SetVtpm(v ServerVTPM) { - o.Vtpm = &v -} - func (o CreateServerPayload) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -985,9 +952,6 @@ func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Volumes) { toSerialize["volumes"] = o.Volumes } - if !IsNil(o.Vtpm) { - toSerialize["vtpm"] = o.Vtpm - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1058,7 +1022,6 @@ func (o *CreateServerPayload) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "updatedAt") delete(additionalProperties, "userData") delete(additionalProperties, "volumes") - delete(additionalProperties, "vtpm") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_create_server_payload_all_of_networking.go b/services/iaas/v2beta1api/model_create_server_payload_all_of_networking.go index 605830344..ee94de4a6 100644 --- a/services/iaas/v2beta1api/model_create_server_payload_all_of_networking.go +++ b/services/iaas/v2beta1api/model_create_server_payload_all_of_networking.go @@ -75,7 +75,16 @@ func (dst *CreateServerPayloadAllOfNetworking) UnmarshalJSON(data []byte) error } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)") + } } } diff --git a/services/iaas/v2beta1api/model_create_volume_payload.go b/services/iaas/v2beta1api/model_create_volume_payload.go index 7dd0ace92..835a0ec17 100644 --- a/services/iaas/v2beta1api/model_create_volume_payload.go +++ b/services/iaas/v2beta1api/model_create_volume_payload.go @@ -39,9 +39,9 @@ type CreateVolumePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ServerId *string `json:"serverId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Size in Gigabyte. diff --git a/services/iaas/v2beta1api/model_destination_cidrv4.go b/services/iaas/v2beta1api/model_destination_cidrv4.go index 0983e6262..d50e1dcec 100644 --- a/services/iaas/v2beta1api/model_destination_cidrv4.go +++ b/services/iaas/v2beta1api/model_destination_cidrv4.go @@ -23,7 +23,7 @@ var _ MappedNullable = &DestinationCIDRv4{} type DestinationCIDRv4 struct { Type string `json:"type"` // An CIDRv4 string. - Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + Value string `json:"value" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_destination_cidrv6.go b/services/iaas/v2beta1api/model_destination_cidrv6.go index 9928040ed..8ac6fed25 100644 --- a/services/iaas/v2beta1api/model_destination_cidrv6.go +++ b/services/iaas/v2beta1api/model_destination_cidrv6.go @@ -23,7 +23,7 @@ var _ MappedNullable = &DestinationCIDRv6{} type DestinationCIDRv6 struct { Type string `json:"type"` // An CIDRv6 string. - Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Value string `json:"value" validate:"regexp=^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_image.go b/services/iaas/v2beta1api/model_image.go index 2f4a590c5..b818b6f5f 100644 --- a/services/iaas/v2beta1api/model_image.go +++ b/services/iaas/v2beta1api/model_image.go @@ -40,7 +40,7 @@ type Image struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). Owner *string `json:"owner,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // When true the image is prevented from being deleted. diff --git a/services/iaas/v2beta1api/model_keypair.go b/services/iaas/v2beta1api/model_keypair.go index ceb6b4166..1248d3111 100644 --- a/services/iaas/v2beta1api/model_keypair.go +++ b/services/iaas/v2beta1api/model_keypair.go @@ -31,7 +31,7 @@ type Keypair struct { // The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-]. Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9@._-]*$"` // Object that represents a public SSH key. - PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\\\s+[A-Za-z0-9+\\/]+[=]{0,3}(\\\\s+.+)?\\\\s*$"` + PublicKey string `json:"publicKey" validate:"regexp=^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\\s+[A-Za-z0-9+/]+[=]{0\\,3}(\\s+.+)?\\s*$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_machine_type.go b/services/iaas/v2beta1api/model_machine_type.go index 815a47a5d..d5e0d3993 100644 --- a/services/iaas/v2beta1api/model_machine_type.go +++ b/services/iaas/v2beta1api/model_machine_type.go @@ -28,7 +28,7 @@ type MachineType struct { // Properties to control certain aspects or scheduling behavior for an object. ExtraSpecs map[string]interface{} `json:"extraSpecs,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Megabyte. Ram int64 `json:"ram"` // The number of virtual CPUs of a server. diff --git a/services/iaas/v2beta1api/model_network_ipv4.go b/services/iaas/v2beta1api/model_network_ipv4.go index 04b47b301..da21148a2 100644 --- a/services/iaas/v2beta1api/model_network_ipv4.go +++ b/services/iaas/v2beta1api/model_network_ipv4.go @@ -22,12 +22,12 @@ var _ MappedNullable = &NetworkIPv4{} // NetworkIPv4 Object that represents the IPv4 part of a network. type NetworkIPv4 struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` Prefixes []string `json:"prefixes"` // String that represents an IPv4 address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Universally Unique Identifier (UUID). VpcNetworkRangeId *string `json:"vpcNetworkRangeId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_network_ipv6.go b/services/iaas/v2beta1api/model_network_ipv6.go index 5ce7bd6e1..53f9be8d3 100644 --- a/services/iaas/v2beta1api/model_network_ipv6.go +++ b/services/iaas/v2beta1api/model_network_ipv6.go @@ -22,7 +22,7 @@ var _ MappedNullable = &NetworkIPv6{} // NetworkIPv6 Object that represents the IPv6 part of a network. type NetworkIPv6 struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` Prefixes []string `json:"prefixes"` diff --git a/services/iaas/v2beta1api/model_network_range.go b/services/iaas/v2beta1api/model_network_range.go index 1c7da01d8..4d38a2a43 100644 --- a/services/iaas/v2beta1api/model_network_range.go +++ b/services/iaas/v2beta1api/model_network_range.go @@ -27,7 +27,7 @@ type NetworkRange struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Classless Inter-Domain Routing (CIDR). - Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Prefix string `json:"prefix" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_nexthop_ipv4.go b/services/iaas/v2beta1api/model_nexthop_ipv4.go index 26bd38635..f9967bdc5 100644 --- a/services/iaas/v2beta1api/model_nexthop_ipv4.go +++ b/services/iaas/v2beta1api/model_nexthop_ipv4.go @@ -23,7 +23,7 @@ var _ MappedNullable = &NexthopIPv4{} type NexthopIPv4 struct { Type string `json:"type"` // An IPv4 address. - Value string `json:"value" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Value string `json:"value" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_nexthop_ipv6.go b/services/iaas/v2beta1api/model_nexthop_ipv6.go index 22b5b2f72..fa37d7f93 100644 --- a/services/iaas/v2beta1api/model_nexthop_ipv6.go +++ b/services/iaas/v2beta1api/model_nexthop_ipv6.go @@ -23,7 +23,7 @@ var _ MappedNullable = &NexthopIPv6{} type NexthopIPv6 struct { Type string `json:"type"` // An IPv6 address. - Value string `json:"value" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Value string `json:"value" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_nic.go b/services/iaas/v2beta1api/model_nic.go index 54dd344b7..73e3d004e 100644 --- a/services/iaas/v2beta1api/model_nic.go +++ b/services/iaas/v2beta1api/model_nic.go @@ -29,15 +29,15 @@ type NIC struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Object that represents an MAC address. Mac *string `json:"mac,omitempty" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this network interface. diff --git a/services/iaas/v2beta1api/model_partial_update_network_payload.go b/services/iaas/v2beta1api/model_partial_update_network_payload.go index 04ab66c22..b9148417c 100644 --- a/services/iaas/v2beta1api/model_partial_update_network_payload.go +++ b/services/iaas/v2beta1api/model_partial_update_network_payload.go @@ -27,7 +27,7 @@ type PartialUpdateNetworkPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2beta1api/model_public_ip.go b/services/iaas/v2beta1api/model_public_ip.go index ff381fd89..b97d2c9ba 100644 --- a/services/iaas/v2beta1api/model_public_ip.go +++ b/services/iaas/v2beta1api/model_public_ip.go @@ -23,7 +23,7 @@ type PublicIp struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // String that represents an IPv4 address. - Ip *string `json:"ip,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v2beta1api/model_public_network.go b/services/iaas/v2beta1api/model_public_network.go index 8928d6cab..e3553f1c4 100644 --- a/services/iaas/v2beta1api/model_public_network.go +++ b/services/iaas/v2beta1api/model_public_network.go @@ -22,7 +22,7 @@ var _ MappedNullable = &PublicNetwork{} // PublicNetwork Public network. type PublicNetwork struct { // Classless Inter-Domain Routing (CIDR). - Cidr string `json:"cidr" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + Cidr string `json:"cidr" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` // Name of the region. Region string `json:"region"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_regional_area_ipv4.go b/services/iaas/v2beta1api/model_regional_area_ipv4.go index 457ed4ad4..a06c297f1 100644 --- a/services/iaas/v2beta1api/model_regional_area_ipv4.go +++ b/services/iaas/v2beta1api/model_regional_area_ipv4.go @@ -31,7 +31,7 @@ type RegionalAreaIPv4 struct { // A list of network area network ranges. NetworkRanges []NetworkRange `json:"networkRanges"` // IPv4 Classless Inter-Domain Routing (CIDR). - TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` + TransferNetwork string `json:"transferNetwork" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_resize_server_payload.go b/services/iaas/v2beta1api/model_resize_server_payload.go index 324b580d1..541c48d1f 100644 --- a/services/iaas/v2beta1api/model_resize_server_payload.go +++ b/services/iaas/v2beta1api/model_resize_server_payload.go @@ -22,7 +22,7 @@ var _ MappedNullable = &ResizeServerPayload{} // ResizeServerPayload struct for ResizeServerPayload type ResizeServerPayload struct { // The name for a General Object. Matches Names and also UUIDs. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_routing_table.go b/services/iaas/v2beta1api/model_routing_table.go index c3ec99af5..5c52e330b 100644 --- a/services/iaas/v2beta1api/model_routing_table.go +++ b/services/iaas/v2beta1api/model_routing_table.go @@ -35,7 +35,7 @@ type RoutingTable struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` // Date-time when resource was last updated. diff --git a/services/iaas/v2beta1api/model_security_group.go b/services/iaas/v2beta1api/model_security_group.go index f69827668..3fdac5a13 100644 --- a/services/iaas/v2beta1api/model_security_group.go +++ b/services/iaas/v2beta1api/model_security_group.go @@ -31,7 +31,7 @@ type SecurityGroup struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // A list containing security group rule objects. Rules []SecurityGroupRule `json:"rules,omitempty"` // Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server. diff --git a/services/iaas/v2beta1api/model_security_group_rule.go b/services/iaas/v2beta1api/model_security_group_rule.go index ca6f2dd78..45eb7e129 100644 --- a/services/iaas/v2beta1api/model_security_group_rule.go +++ b/services/iaas/v2beta1api/model_security_group_rule.go @@ -34,7 +34,7 @@ type SecurityGroupRule struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The remote IP range which the rule should match. - IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` + IpRange *string `json:"ipRange,omitempty" validate:"regexp=^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1\\,4}:){7\\,7}[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,7}:|([0-9a-fA-F]{1\\,4}:){1\\,6}:[0-9a-fA-F]{1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,5}(:[0-9a-fA-F]{1\\,4}){1\\,2}|([0-9a-fA-F]{1\\,4}:){1\\,4}(:[0-9a-fA-F]{1\\,4}){1\\,3}|([0-9a-fA-F]{1\\,4}:){1\\,3}(:[0-9a-fA-F]{1\\,4}){1\\,4}|([0-9a-fA-F]{1\\,4}:){1\\,2}(:[0-9a-fA-F]{1\\,4}){1\\,5}|[0-9a-fA-F]{1\\,4}:((:[0-9a-fA-F]{1\\,4}){1\\,6})|:((:[0-9a-fA-F]{1\\,4}){1\\,7}|:)|fe80:(:[0-9a-fA-F]{0\\,4}){0\\,4}%[0-9a-zA-Z]{1\\,}|::(ffff(:0{1\\,4}){0\\,1}:){0\\,1}((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])|([0-9a-fA-F]{1\\,4}:){1\\,4}:((25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9])\\.){3\\,3}(25[0-5]|(2[0-4]|1{0\\,1}[0-9]){0\\,1}[0-9]))(/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$"` PortRange *PortRange `json:"portRange,omitempty"` // The remote security group which the rule should match. RemoteSecurityGroupId *string `json:"remoteSecurityGroupId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` diff --git a/services/iaas/v2beta1api/model_server.go b/services/iaas/v2beta1api/model_server.go index 4209f7ee3..49fe5c516 100644 --- a/services/iaas/v2beta1api/model_server.go +++ b/services/iaas/v2beta1api/model_server.go @@ -45,12 +45,12 @@ type Server struct { // Date-time when resource was launched. LaunchedAt *time.Time `json:"launchedAt,omitempty"` // Name of the machine type the server shall belong to. - MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + MachineType string `json:"machineType" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` MaintenanceWindow *ServerMaintenance `json:"maintenanceWindow,omitempty"` // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name string `json:"name" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` Networking *ServerNetworking `json:"networking,omitempty"` // The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested. Nics []ServerNetwork `json:"nics,omitempty"` @@ -67,8 +67,7 @@ type Server struct { // User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server. Only shown when detailed information is requested. UserData *string `json:"userData,omitempty"` // The list of volumes attached to the server. - Volumes []string `json:"volumes,omitempty"` - Vtpm *ServerVTPM `json:"vtpm,omitempty"` + Volumes []string `json:"volumes,omitempty"` AdditionalProperties map[string]interface{} } @@ -881,38 +880,6 @@ func (o *Server) SetVolumes(v []string) { o.Volumes = v } -// GetVtpm returns the Vtpm field value if set, zero value otherwise. -func (o *Server) GetVtpm() ServerVTPM { - if o == nil || IsNil(o.Vtpm) { - var ret ServerVTPM - return ret - } - return *o.Vtpm -} - -// GetVtpmOk returns a tuple with the Vtpm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Server) GetVtpmOk() (*ServerVTPM, bool) { - if o == nil || IsNil(o.Vtpm) { - return nil, false - } - return o.Vtpm, true -} - -// HasVtpm returns a boolean if a field has been set. -func (o *Server) HasVtpm() bool { - if o != nil && !IsNil(o.Vtpm) { - return true - } - - return false -} - -// SetVtpm gets a reference to the given ServerVTPM and assigns it to the Vtpm field. -func (o *Server) SetVtpm(v ServerVTPM) { - o.Vtpm = &v -} - func (o Server) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -994,9 +961,6 @@ func (o Server) ToMap() (map[string]interface{}, error) { if !IsNil(o.Volumes) { toSerialize["volumes"] = o.Volumes } - if !IsNil(o.Vtpm) { - toSerialize["vtpm"] = o.Vtpm - } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1066,7 +1030,6 @@ func (o *Server) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "updatedAt") delete(additionalProperties, "userData") delete(additionalProperties, "volumes") - delete(additionalProperties, "vtpm") o.AdditionalProperties = additionalProperties } diff --git a/services/iaas/v2beta1api/model_server_network.go b/services/iaas/v2beta1api/model_server_network.go index 9d40c4be2..afda437ff 100644 --- a/services/iaas/v2beta1api/model_server_network.go +++ b/services/iaas/v2beta1api/model_server_network.go @@ -24,21 +24,21 @@ type ServerNetwork struct { // A list of IPs or CIDR notations. AllowedAddresses []AllowedAddressesInner `json:"allowedAddresses,omitempty"` // Object that represents an IP address. - Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + Ipv4 *string `json:"ipv4,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // String that represents an IPv6 address. - Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Ipv6 *string `json:"ipv6,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // Object that represents an MAC address. Mac string `json:"mac" validate:"regexp=^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"` // Universally Unique Identifier (UUID). NetworkId string `json:"networkId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // The name for a General Object. Matches Names and also UUIDs. - NetworkName string `json:"networkName" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + NetworkName string `json:"networkName" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). NicId string `json:"nicId" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // If this is set to false, then no security groups will apply to this server network interface. NicSecurity bool `json:"nicSecurity"` // Object that represents an IP address. - PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$)|(^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$))"` + PublicIp *string `json:"publicIp,omitempty" validate:"regexp=((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))"` // A list of UUIDs. SecurityGroups []string `json:"securityGroups,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_server_networking.go b/services/iaas/v2beta1api/model_server_networking.go index 07b253cc7..28df935ba 100644 --- a/services/iaas/v2beta1api/model_server_networking.go +++ b/services/iaas/v2beta1api/model_server_networking.go @@ -75,7 +75,16 @@ func (dst *ServerNetworking) UnmarshalJSON(data []byte) error { } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + } + if err != nil { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking): %v", err) + } else { + return fmt.Errorf("data failed to match schemas in oneOf(ServerNetworking)") + } } } diff --git a/services/iaas/v2beta1api/model_server_vtpm.go b/services/iaas/v2beta1api/model_server_vtpm.go deleted file mode 100644 index 136f796e0..000000000 --- a/services/iaas/v2beta1api/model_server_vtpm.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -STACKIT IaaS API - -This API allows you to create and modify IaaS resources. - -API version: 2beta1 -Contact: stackit-iaas@mail.schwarz -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2beta1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the ServerVTPM type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServerVTPM{} - -// ServerVTPM Configuration for the Virtual Trusted Platform Module (vTPM). -type ServerVTPM struct { - // Defines whether the server instance has the Virtual Trusted Platform Module (vTPM) enabled. - Enabled bool `json:"enabled"` - AdditionalProperties map[string]interface{} -} - -type _ServerVTPM ServerVTPM - -// NewServerVTPM instantiates a new ServerVTPM 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 NewServerVTPM(enabled bool) *ServerVTPM { - this := ServerVTPM{} - this.Enabled = enabled - return &this -} - -// NewServerVTPMWithDefaults instantiates a new ServerVTPM 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 NewServerVTPMWithDefaults() *ServerVTPM { - this := ServerVTPM{} - var enabled bool = false - this.Enabled = enabled - return &this -} - -// GetEnabled returns the Enabled field value -func (o *ServerVTPM) GetEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -func (o *ServerVTPM) GetEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Enabled, true -} - -// SetEnabled sets field value -func (o *ServerVTPM) SetEnabled(v bool) { - o.Enabled = v -} - -func (o ServerVTPM) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ServerVTPM) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["enabled"] = o.Enabled - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ServerVTPM) 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{ - "enabled", - } - - 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) - } - } - - varServerVTPM := _ServerVTPM{} - - err = json.Unmarshal(data, &varServerVTPM) - - if err != nil { - return err - } - - *o = ServerVTPM(varServerVTPM) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "enabled") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableServerVTPM struct { - value *ServerVTPM - isSet bool -} - -func (v NullableServerVTPM) Get() *ServerVTPM { - return v.value -} - -func (v *NullableServerVTPM) Set(val *ServerVTPM) { - v.value = val - v.isSet = true -} - -func (v NullableServerVTPM) IsSet() bool { - return v.isSet -} - -func (v *NullableServerVTPM) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServerVTPM(val *ServerVTPM) *NullableServerVTPM { - return &NullableServerVTPM{value: val, isSet: true} -} - -func (v NullableServerVTPM) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServerVTPM) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaas/v2beta1api/model_snapshot.go b/services/iaas/v2beta1api/model_snapshot.go index 1e89ea405..987a2135d 100644 --- a/services/iaas/v2beta1api/model_snapshot.go +++ b/services/iaas/v2beta1api/model_snapshot.go @@ -33,7 +33,7 @@ type Snapshot struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. diff --git a/services/iaas/v2beta1api/model_update_image_payload.go b/services/iaas/v2beta1api/model_update_image_payload.go index 4e7d721e5..0bc191aa5 100644 --- a/services/iaas/v2beta1api/model_update_image_payload.go +++ b/services/iaas/v2beta1api/model_update_image_payload.go @@ -31,7 +31,7 @@ type UpdateImagePayload struct { // Size in Megabyte. MinRam *int64 `json:"minRam,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // When true the image is prevented from being deleted. Protected *bool `json:"protected,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_update_network_ipv4_body.go b/services/iaas/v2beta1api/model_update_network_ipv4_body.go index ac7457c59..53c603ede 100644 --- a/services/iaas/v2beta1api/model_update_network_ipv4_body.go +++ b/services/iaas/v2beta1api/model_update_network_ipv4_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv4Body{} // UpdateNetworkIPv4Body The config object for a IPv4 network update. type UpdateNetworkIPv4Body struct { // The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_update_network_ipv6_body.go b/services/iaas/v2beta1api/model_update_network_ipv6_body.go index f42561388..f3a169bce 100644 --- a/services/iaas/v2beta1api/model_update_network_ipv6_body.go +++ b/services/iaas/v2beta1api/model_update_network_ipv6_body.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateNetworkIPv6Body{} // UpdateNetworkIPv6Body The config object for a IPv6 network update. type UpdateNetworkIPv6Body struct { // The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. - Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)(\\\\.(25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]?\\\\d)){3}))|:)))(%.+)?\\\\s*$"` + Gateway NullableString `json:"gateway,omitempty" validate:"regexp=^\\s*((([0-9a-f]{1\\,4}:){7}([0-9a-f]{1\\,4}|:))|(([0-9a-f]{1\\,4}:){6}(:[0-9a-f]{1\\,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){5}(((:[0-9a-f]{1\\,4}){1\\,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1\\,4}:){4}(((:[0-9a-f]{1\\,4}){1\\,3})|((:[0-9a-f]{1\\,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){3}(((:[0-9a-f]{1\\,4}){1\\,4})|((:[0-9a-f]{1\\,4}){0\\,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){2}(((:[0-9a-f]{1\\,4}){1\\,5})|((:[0-9a-f]{1\\,4}){0\\,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1\\,4}:){1}(((:[0-9a-f]{1\\,4}){1\\,6})|((:[0-9a-f]{1\\,4}){0\\,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1\\,4}){1\\,7})|((:[0-9a-f]{1\\,4}){0\\,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers []string `json:"nameservers,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_update_nic_payload.go b/services/iaas/v2beta1api/model_update_nic_payload.go index 57f90be4b..0cfd96d22 100644 --- a/services/iaas/v2beta1api/model_update_nic_payload.go +++ b/services/iaas/v2beta1api/model_update_nic_payload.go @@ -27,7 +27,7 @@ type UpdateNicPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // If this is set to false, then no security groups will apply to this network interface. NicSecurity *bool `json:"nicSecurity,omitempty"` // A list of UUIDs. diff --git a/services/iaas/v2beta1api/model_update_public_ip_payload.go b/services/iaas/v2beta1api/model_update_public_ip_payload.go index 874424426..6563dfe5e 100644 --- a/services/iaas/v2beta1api/model_update_public_ip_payload.go +++ b/services/iaas/v2beta1api/model_update_public_ip_payload.go @@ -23,7 +23,7 @@ type UpdatePublicIPPayload struct { // Universally Unique Identifier (UUID). Id *string `json:"id,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // String that represents an IPv4 address. - Ip *string `json:"ip,omitempty" validate:"regexp=^\\\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\\\s*$"` + Ip *string `json:"ip,omitempty" validate:"regexp=^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$"` // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // Associate the public IP with a network interface (ID). diff --git a/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go b/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go index d4affe8c4..163687b5c 100644 --- a/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go +++ b/services/iaas/v2beta1api/model_update_routing_table_of_area_payload.go @@ -27,7 +27,7 @@ type UpdateRoutingTableOfAreaPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The update config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA. SystemRoutes *bool `json:"systemRoutes,omitempty"` AdditionalProperties map[string]interface{} diff --git a/services/iaas/v2beta1api/model_update_server_payload.go b/services/iaas/v2beta1api/model_update_server_payload.go index 0ba065d73..8c92de6c3 100644 --- a/services/iaas/v2beta1api/model_update_server_payload.go +++ b/services/iaas/v2beta1api/model_update_server_payload.go @@ -25,7 +25,7 @@ type UpdateServerPayload struct { // Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key. Metadata map[string]interface{} `json:"metadata,omitempty"` // The name for a Server. - Name *string `json:"name,omitempty" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` + Name *string `json:"name,omitempty" validate:"regexp=^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_update_volume_payload.go b/services/iaas/v2beta1api/model_update_volume_payload.go index f65258f5c..504fe843c 100644 --- a/services/iaas/v2beta1api/model_update_volume_payload.go +++ b/services/iaas/v2beta1api/model_update_volume_payload.go @@ -28,7 +28,7 @@ type UpdateVolumePayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go b/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go index fb2c5715f..174ac4949 100644 --- a/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_create_snapshot_payload.go @@ -33,7 +33,7 @@ type V2beta1CreateSnapshotPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`. diff --git a/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go index 7fbe1dac5..88469054d 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_backup_payload.go @@ -34,7 +34,7 @@ type V2beta1UpdateBackupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Size in Gigabyte. Size *int64 `json:"size,omitempty"` // Universally Unique Identifier (UUID). diff --git a/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go index 1be7d586c..52b545152 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_security_group_payload.go @@ -25,7 +25,7 @@ type V2beta1UpdateSecurityGroupPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go b/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go index 8e00649e8..8a2ae35d0 100644 --- a/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go +++ b/services/iaas/v2beta1api/model_v2beta1_update_snapshot_payload.go @@ -25,7 +25,7 @@ type V2beta1UpdateSnapshotPayload struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_volume.go b/services/iaas/v2beta1api/model_volume.go index d6b109951..4eb93b38a 100644 --- a/services/iaas/v2beta1api/model_volume.go +++ b/services/iaas/v2beta1api/model_volume.go @@ -39,9 +39,9 @@ type Volume struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name *string `json:"name,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // The name for a General Object. Matches Names and also UUIDs. - PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + PerformanceClass *string `json:"performanceClass,omitempty" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Universally Unique Identifier (UUID). ServerId *string `json:"serverId,omitempty" validate:"regexp=^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"` // Size in Gigabyte. diff --git a/services/iaas/v2beta1api/model_volume_encryption_parameter.go b/services/iaas/v2beta1api/model_volume_encryption_parameter.go index f36960a00..75631f241 100644 --- a/services/iaas/v2beta1api/model_volume_encryption_parameter.go +++ b/services/iaas/v2beta1api/model_volume_encryption_parameter.go @@ -32,7 +32,7 @@ type VolumeEncryptionParameter struct { // Optional predefined secret, which will be encrypted against the key-encryption-key within the STACKIT-KMS. If not defined, a random secret will be generated by the API and encrypted against the STACKIT-KMS. If a key-payload is provided here, it must be base64 encoded. KeyPayload *string `json:"keyPayload,omitempty"` // Service-Account linked to the Key within the STACKIT-KMS. - ServiceAccount string `json:"serviceAccount" validate:"regexp=[a-z0-9-]+(?:\\\\.[a-z0-9]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"` + ServiceAccount string `json:"serviceAccount" validate:"regexp=[a-z0-9-]+(?:\\.[a-z0-9]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"` AdditionalProperties map[string]interface{} } diff --git a/services/iaas/v2beta1api/model_volume_performance_class.go b/services/iaas/v2beta1api/model_volume_performance_class.go index 43a6fca49..b8e9bdc6f 100644 --- a/services/iaas/v2beta1api/model_volume_performance_class.go +++ b/services/iaas/v2beta1api/model_volume_performance_class.go @@ -28,7 +28,7 @@ type VolumePerformanceClass struct { // Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys. Labels map[string]interface{} `json:"labels,omitempty"` // The name for a General Object. Matches Names and also UUIDs. - Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ \\/._-]*[A-Za-z0-9]+)*$"` + Name string `json:"name" validate:"regexp=^[A-Za-z0-9]+([ /._-]*[A-Za-z0-9]+)*$"` // Throughput in Megabyte per second. Throughput *int64 `json:"throughput,omitempty"` AdditionalProperties map[string]interface{}