From 8693a50dde8d56f1562ad6d659bc1c61f0e28463 Mon Sep 17 00:00:00 2001 From: Kubernetes Prow Robot <20407524+k8s-ci-robot@users.noreply.github.com> Date: Wed, 13 Mar 2024 04:25:49 -0700 Subject: [PATCH 1/3] Merge pull request #6617 from ionos-cloud/update-ionos-sdk ionoscloud: Update ionos-cloud sdk-go and add metrics --- .../cloudprovider/ionoscloud/README.md | 13 +- .../cloudprovider/ionoscloud/cache.go | 84 +- .../cloudprovider/ionoscloud/cache_test.go | 35 +- .../cloudprovider/ionoscloud/client.go | 158 +- .../cloudprovider/ionoscloud/client_test.go | 29 +- .../ionoscloud/ionos-cloud-sdk-go/api_.go | 10 +- .../api_application_load_balancers.go | 3426 +++++++++++++++++ .../ionos-cloud-sdk-go/api_backup_units.go | 20 +- .../api_contract_resources.go | 10 +- .../ionos-cloud-sdk-go/api_data_centers.go | 28 +- .../ionos-cloud-sdk-go/api_firewall_rules.go | 24 +- .../ionos-cloud-sdk-go/api_flow_logs.go | 20 +- .../ionos-cloud-sdk-go/api_images.go | 18 +- .../ionos-cloud-sdk-go/api_ip_blocks.go | 24 +- .../ionos-cloud-sdk-go/api_kubernetes.go | 120 +- .../ionos-cloud-sdk-go/api_labels.go | 104 +- .../ionoscloud/ionos-cloud-sdk-go/api_lans.go | 26 +- .../ionos-cloud-sdk-go/api_load_balancers.go | 36 +- .../ionos-cloud-sdk-go/api_locations.go | 36 +- .../ionos-cloud-sdk-go/api_nat_gateways.go | 62 +- .../api_network_interfaces.go | 20 +- .../api_network_load_balancers.go | 56 +- .../api_private_cross_connects.go | 18 +- .../ionos-cloud-sdk-go/api_requests.go | 12 +- .../ionos-cloud-sdk-go/api_servers.go | 222 +- .../ionos-cloud-sdk-go/api_snapshots.go | 18 +- .../ionos-cloud-sdk-go/api_target_groups.go | 1140 ++++++ .../ionos-cloud-sdk-go/api_templates.go | 34 +- .../ionos-cloud-sdk-go/api_user_management.go | 70 +- .../ionos-cloud-sdk-go/api_user_s3_keys.go | 22 +- .../ionos-cloud-sdk-go/api_volumes.go | 28 +- .../ionoscloud/ionos-cloud-sdk-go/client.go | 384 +- .../ionos-cloud-sdk-go/configuration.go | 52 +- .../ionoscloud/ionos-cloud-sdk-go/logger.go | 80 + .../model_application_load_balancer.go | 341 ++ ...odel_application_load_balancer_entities.go | 121 + ...plication_load_balancer_forwarding_rule.go | 298 ++ ...oad_balancer_forwarding_rule_properties.go | 391 ++ ...ation_load_balancer_forwarding_rule_put.go | 255 ++ ...lication_load_balancer_forwarding_rules.go | 385 ++ ...del_application_load_balancer_http_rule.go | 477 +++ ...ation_load_balancer_http_rule_condition.go | 301 ++ ...el_application_load_balancer_properties.go | 302 ++ .../model_application_load_balancer_put.go | 255 ++ .../model_application_load_balancers.go | 385 ++ .../model_attached_volumes.go | 199 +- .../ionos-cloud-sdk-go/model_backup_unit.go | 157 +- .../model_backup_unit_properties.go | 91 +- .../model_backup_unit_sso.go | 3 +- .../ionos-cloud-sdk-go/model_backup_units.go | 128 +- .../ionos-cloud-sdk-go/model_balanced_nics.go | 199 +- .../ionos-cloud-sdk-go/model_cdroms.go | 199 +- .../model_connectable_datacenter.go | 65 +- .../ionos-cloud-sdk-go/model_contract.go | 64 +- .../model_contract_properties.go | 99 +- .../ionos-cloud-sdk-go/model_contracts.go | 128 +- .../model_cpu_architecture_properties.go | 12 +- .../model_data_center_entities.go | 188 +- .../ionos-cloud-sdk-go/model_datacenter.go | 140 +- .../model_datacenter_element_metadata.go | 244 +- .../model_datacenter_properties.go | 226 +- .../ionos-cloud-sdk-go/model_datacenters.go | 199 +- .../ionos-cloud-sdk-go/model_error.go | 6 +- .../ionos-cloud-sdk-go/model_error_message.go | 6 +- .../ionos-cloud-sdk-go/model_firewall_rule.go | 157 +- .../model_firewall_rules.go | 199 +- .../model_firewallrule_properties.go | 387 +- .../ionos-cloud-sdk-go/model_flow_log.go | 157 +- .../model_flow_log_properties.go | 108 +- .../ionos-cloud-sdk-go/model_flow_log_put.go | 128 +- .../ionos-cloud-sdk-go/model_flow_logs.go | 199 +- .../ionos-cloud-sdk-go/model_group.go | 135 +- .../model_group_entities.go | 62 +- .../ionos-cloud-sdk-go/model_group_members.go | 128 +- .../model_group_properties.go | 559 ++- .../ionos-cloud-sdk-go/model_group_share.go | 128 +- .../model_group_share_properties.go | 6 +- .../ionos-cloud-sdk-go/model_group_shares.go | 128 +- .../ionos-cloud-sdk-go/model_group_users.go | 128 +- .../ionos-cloud-sdk-go/model_groups.go | 128 +- .../ionos-cloud-sdk-go/model_image.go | 157 +- .../model_image_properties.go | 627 +-- .../ionos-cloud-sdk-go/model_images.go | 128 +- .../ionos-cloud-sdk-go/model_info.go | 15 +- .../ionos-cloud-sdk-go/model_ip_block.go | 157 +- .../model_ip_block_properties.go | 129 +- .../ionos-cloud-sdk-go/model_ip_blocks.go | 199 +- .../ionos-cloud-sdk-go/model_ip_consumer.go | 275 +- .../ionos-cloud-sdk-go/model_ip_failover.go | 6 +- .../model_kubernetes_auto_scaling.go | 70 +- .../model_kubernetes_cluster.go | 142 +- .../model_kubernetes_cluster_entities.go | 3 +- .../model_kubernetes_cluster_for_post.go | 142 +- .../model_kubernetes_cluster_for_put.go | 140 +- .../model_kubernetes_cluster_properties.go | 312 +- ..._kubernetes_cluster_properties_for_post.go | 246 +- ...l_kubernetes_cluster_properties_for_put.go | 83 +- .../model_kubernetes_clusters.go | 132 +- .../model_kubernetes_maintenance_window.go | 10 +- .../model_kubernetes_node.go | 157 +- .../model_kubernetes_node_metadata.go | 165 +- .../model_kubernetes_node_pool.go | 157 +- .../model_kubernetes_node_pool_for_post.go | 157 +- .../model_kubernetes_node_pool_for_put.go | 157 +- .../model_kubernetes_node_pool_lan.go | 89 +- .../model_kubernetes_node_pool_lan_routes.go | 64 +- .../model_kubernetes_node_pool_properties.go | 572 ++- ...ubernetes_node_pool_properties_for_post.go | 543 ++- ...kubernetes_node_pool_properties_for_put.go | 245 +- .../model_kubernetes_node_pools.go | 128 +- .../model_kubernetes_node_properties.go | 110 +- .../model_kubernetes_nodes.go | 128 +- .../ionos-cloud-sdk-go/model_label.go | 157 +- .../model_label_properties.go | 79 +- .../model_label_resource.go | 157 +- .../model_label_resource_properties.go | 6 +- .../model_label_resources.go | 199 +- .../ionos-cloud-sdk-go/model_labels.go | 128 +- .../ionos-cloud-sdk-go/model_lan.go | 140 +- .../ionos-cloud-sdk-go/model_lan_entities.go | 3 +- .../ionos-cloud-sdk-go/model_lan_nics.go | 199 +- .../ionos-cloud-sdk-go/model_lan_post.go | 166 +- .../model_lan_properties.go | 121 +- .../model_lan_properties_post.go | 121 +- .../ionos-cloud-sdk-go/model_lans.go | 199 +- .../ionos-cloud-sdk-go/model_loadbalancer.go | 140 +- .../model_loadbalancer_entities.go | 3 +- .../model_loadbalancer_properties.go | 82 +- .../ionos-cloud-sdk-go/model_loadbalancers.go | 199 +- .../ionos-cloud-sdk-go/model_location.go | 157 +- .../model_location_properties.go | 80 +- .../ionos-cloud-sdk-go/model_locations.go | 128 +- .../ionos-cloud-sdk-go/model_nat_gateway.go | 140 +- .../model_nat_gateway_entities.go | 62 +- .../model_nat_gateway_lan_properties.go | 64 +- .../model_nat_gateway_properties.go | 91 +- .../model_nat_gateway_put.go | 128 +- .../model_nat_gateway_rule.go | 157 +- .../model_nat_gateway_rule_properties.go | 147 +- .../model_nat_gateway_rule_put.go | 128 +- .../model_nat_gateway_rules.go | 128 +- .../ionos-cloud-sdk-go/model_nat_gateways.go | 199 +- .../model_network_load_balancer.go | 140 +- .../model_network_load_balancer_entities.go | 6 +- ...l_network_load_balancer_forwarding_rule.go | 157 +- ...d_balancer_forwarding_rule_health_check.go | 70 +- ...oad_balancer_forwarding_rule_properties.go | 177 +- ...twork_load_balancer_forwarding_rule_put.go | 128 +- ...rk_load_balancer_forwarding_rule_target.go | 92 +- ...cer_forwarding_rule_target_health_check.go | 9 +- ..._network_load_balancer_forwarding_rules.go | 199 +- .../model_network_load_balancer_properties.go | 163 +- .../model_network_load_balancer_put.go | 128 +- .../model_network_load_balancers.go | 199 +- .../ionos-cloud-sdk-go/model_nic.go | 140 +- .../ionos-cloud-sdk-go/model_nic_entities.go | 62 +- .../model_nic_properties.go | 433 ++- .../ionos-cloud-sdk-go/model_nic_put.go | 128 +- .../ionos-cloud-sdk-go/model_nics.go | 199 +- .../model_no_state_meta_data.go | 239 +- .../model_pagination_links.go | 91 +- .../ionos-cloud-sdk-go/model_peer.go | 151 +- .../model_private_cross_connect.go | 157 +- .../model_private_cross_connect_properties.go | 102 +- .../model_private_cross_connects.go | 128 +- .../model_remote_console_url.go | 3 +- .../ionos-cloud-sdk-go/model_request.go | 157 +- .../model_request_metadata.go | 84 +- .../model_request_properties.go | 72 +- .../model_request_status.go | 128 +- .../model_request_status_metadata.go | 72 +- .../model_request_target.go | 62 +- .../ionos-cloud-sdk-go/model_requests.go | 205 +- .../ionos-cloud-sdk-go/model_resource.go | 140 +- .../model_resource_entities.go | 3 +- .../model_resource_groups.go | 128 +- .../model_resource_limits.go | 748 ++-- .../model_resource_properties.go | 6 +- .../model_resource_reference.go | 91 +- .../ionos-cloud-sdk-go/model_resources.go | 128 +- .../model_resources_users.go | 128 +- .../ionos-cloud-sdk-go/model_s3_bucket.go | 5 +- .../ionos-cloud-sdk-go/model_s3_key.go | 157 +- .../model_s3_key_metadata.go | 78 +- .../model_s3_key_properties.go | 64 +- .../ionos-cloud-sdk-go/model_s3_keys.go | 128 +- .../model_s3_object_storage_sso.go | 3 +- .../ionos-cloud-sdk-go/model_server.go | 140 +- .../model_server_entities.go | 65 +- .../model_server_properties.go | 353 +- .../ionos-cloud-sdk-go/model_servers.go | 199 +- .../ionos-cloud-sdk-go/model_snapshot.go | 157 +- .../model_snapshot_properties.go | 504 +-- .../ionos-cloud-sdk-go/model_snapshots.go | 128 +- .../ionos-cloud-sdk-go/model_target_group.go | 298 ++ .../model_target_group_health_check.go | 210 + .../model_target_group_http_health_check.go | 345 ++ .../model_target_group_properties.go | 344 ++ .../model_target_group_put.go | 255 ++ .../model_target_group_target.go | 350 ++ .../ionos-cloud-sdk-go/model_target_groups.go | 385 ++ .../model_target_port_range.go | 64 +- .../ionos-cloud-sdk-go/model_template.go | 157 +- .../model_template_properties.go | 74 +- .../ionos-cloud-sdk-go/model_templates.go | 128 +- .../ionos-cloud-sdk-go/model_token.go | 3 +- .../ionos-cloud-sdk-go/model_user.go | 140 +- .../ionos-cloud-sdk-go/model_user_metadata.go | 81 +- .../ionos-cloud-sdk-go/model_user_post.go | 3 +- .../model_user_properties.go | 184 +- .../model_user_properties_post.go | 184 +- .../model_user_properties_put.go | 232 +- .../ionos-cloud-sdk-go/model_user_put.go | 6 +- .../ionos-cloud-sdk-go/model_users.go | 199 +- .../model_users_entities.go | 62 +- .../ionos-cloud-sdk-go/model_volume.go | 157 +- .../model_volume_properties.go | 710 ++-- .../ionos-cloud-sdk-go/model_volumes.go | 199 +- .../ionoscloud/ionos-cloud-sdk-go/response.go | 22 + .../ionoscloud/ionos-cloud-sdk-go/utils.go | 46 + .../ionoscloud/ionoscloud_cloud_provider.go | 28 +- .../ionoscloud_cloud_provider_test.go | 23 +- .../ionoscloud/ionoscloud_manager.go | 81 +- .../ionoscloud/ionoscloud_manager_test.go | 218 +- .../ionoscloud/ionoscloud_metrics.go | 53 + .../ionoscloud/mock_api_client_test.go | 70 +- .../mock_ionos_cloud_manager_test.go | 59 +- .../cloudprovider/ionoscloud/utils.go | 29 +- .../cloudprovider/ionoscloud/utils_test.go | 40 +- hack/verify-spelling.sh | 2 +- 230 files changed, 25020 insertions(+), 12248 deletions(-) create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_application_load_balancers.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_target_groups.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/logger.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_entities.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_properties.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_put.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rules.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule_condition.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_properties.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_put.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancers.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_health_check.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_http_health_check.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_properties.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_put.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_target.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_groups.go create mode 100644 cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_metrics.go diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/README.md b/cluster-autoscaler/cloudprovider/ionoscloud/README.md index 371ef428f3ef..268628365374 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/README.md +++ b/cluster-autoscaler/cloudprovider/ionoscloud/README.md @@ -25,12 +25,18 @@ Store the token in a secret: kubectl create secret generic cloud-config --from-literal=token=MY_TOKEN ``` -Edit [`example-values.yaml`](./examples-values.yaml) and deploy using helm: +Edit [`example-values.yaml`](./example-values.yaml) and deploy using helm: ```console helm install ionoscloud-cluster-autoscaler autoscaler/cluster-autoscaler -f example-values.yaml ``` +### Configuration + +The `IONOS_ADDITIONAL_HEADERS` environment variable can be used to configure the client to send additional headers on +each Ionos Cloud API request, such as `X-Contract-Number`. This can be useful for users with multiple contracts. +The format is a semicolon-separated list of key:value pairs, e.g. `IONOS_ADDITIONAL_HEADERS="X-Contract-Number:1234657890"`. + ## Development The unit tests use mocks generated by [mockery](https://github.com/vektra/mockery/v2). To update them run: @@ -40,6 +46,11 @@ mockery --inpackage --testonly --case snake --boilerplate-file ../../../hack/boi mockery --inpackage --testonly --case snake --boilerplate-file ../../../hack/boilerplate/boilerplate.generatego.txt --name IonosCloudManager ``` +### Debugging + +The global logging verbosity controlled by the `--v` flag is passed on to the Ionos Cloud SDK client logger. +Verbosity 5 maps to `Debug` and 7 to `Trace`. **Do not enable this in production, as it will print full request and response data.** + ### Build an image Build and push a docker image in the `cluster-autoscaler` directory: diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/cache.go b/cluster-autoscaler/cloudprovider/ionoscloud/cache.go index 235397bdb68b..0106422569e9 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/cache.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/cache.go @@ -17,29 +17,20 @@ limitations under the License. package ionoscloud import ( + "maps" "sync" - "time" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/klog/v2" ) -const nodeGroupCacheEntryTimeout = 2 * time.Minute - -type nodeGroupCacheEntry struct { - data cloudprovider.NodeGroup - ts time.Time -} - -var timeNow = time.Now - // IonosCache caches resources to reduce API calls. // Cached state includes autoscaling limits, sizes and target sizes, a mapping of instances to node // groups, and a simple lock mechanism to prevent invalid node group writes. type IonosCache struct { mutex sync.Mutex - nodeGroups map[string]nodeGroupCacheEntry + nodeGroups map[string]cloudprovider.NodeGroup nodesToNodeGroups map[string]string nodeGroupSizes map[string]int nodeGroupTargetSizes map[string]int @@ -49,11 +40,11 @@ type IonosCache struct { // NewIonosCache initializes a new IonosCache. func NewIonosCache() *IonosCache { return &IonosCache{ - nodeGroups: map[string]nodeGroupCacheEntry{}, - nodesToNodeGroups: map[string]string{}, - nodeGroupSizes: map[string]int{}, - nodeGroupTargetSizes: map[string]int{}, - nodeGroupLockTable: map[string]bool{}, + nodeGroups: make(map[string]cloudprovider.NodeGroup), + nodesToNodeGroups: make(map[string]string), + nodeGroupSizes: make(map[string]int), + nodeGroupTargetSizes: make(map[string]int), + nodeGroupLockTable: make(map[string]bool), } } @@ -62,15 +53,7 @@ func (cache *IonosCache) AddNodeGroup(newPool cloudprovider.NodeGroup) { cache.mutex.Lock() defer cache.mutex.Unlock() - cache.nodeGroups[newPool.Id()] = nodeGroupCacheEntry{data: newPool} -} - -func (cache *IonosCache) removeNodesForNodeGroupNoLock(id string) { - for nodeId, nodeGroupId := range cache.nodesToNodeGroups { - if nodeGroupId == id { - delete(cache.nodesToNodeGroups, nodeId) - } - } + cache.nodeGroups[newPool.Id()] = newPool } // RemoveInstanceFromCache deletes an instance and its respective mapping to the node group from @@ -79,10 +62,10 @@ func (cache *IonosCache) RemoveInstanceFromCache(id string) { cache.mutex.Lock() defer cache.mutex.Unlock() - klog.V(5).Infof("Removed instance %s from cache", id) - nodeGroupId := cache.nodesToNodeGroups[id] - delete(cache.nodesToNodeGroups, id) - cache.updateNodeGroupTimestampNoLock(nodeGroupId) + if _, ok := cache.nodesToNodeGroups[id]; ok { + delete(cache.nodesToNodeGroups, id) + klog.V(5).Infof("Removed instance %s from cache", id) + } } // SetInstancesCacheForNodeGroup overwrites cached instances and mappings for a node group. @@ -90,27 +73,28 @@ func (cache *IonosCache) SetInstancesCacheForNodeGroup(id string, instances []cl cache.mutex.Lock() defer cache.mutex.Unlock() - cache.removeNodesForNodeGroupNoLock(id) + maps.DeleteFunc(cache.nodesToNodeGroups, func(_, nodeGroupID string) bool { + return nodeGroupID == id + }) cache.setInstancesCacheForNodeGroupNoLock(id, instances) } func (cache *IonosCache) setInstancesCacheForNodeGroupNoLock(id string, instances []cloudprovider.Instance) { for _, instance := range instances { - nodeId := convertToNodeId(instance.Id) - cache.nodesToNodeGroups[nodeId] = id + nodeID := convertToNodeID(instance.Id) + cache.nodesToNodeGroups[nodeID] = id } - cache.updateNodeGroupTimestampNoLock(id) } -// GetNodeGroupIds returns an unsorted list of cached node group ids. -func (cache *IonosCache) GetNodeGroupIds() []string { +// GetNodeGroupIDs returns an unsorted list of cached node group ids. +func (cache *IonosCache) GetNodeGroupIDs() []string { cache.mutex.Lock() defer cache.mutex.Unlock() - return cache.getNodeGroupIds() + return cache.getNodeGroupIDs() } -func (cache *IonosCache) getNodeGroupIds() []string { +func (cache *IonosCache) getNodeGroupIDs() []string { ids := make([]string, 0, len(cache.nodeGroups)) for id := range cache.nodeGroups { ids = append(ids, id) @@ -125,26 +109,26 @@ func (cache *IonosCache) GetNodeGroups() []cloudprovider.NodeGroup { nodeGroups := make([]cloudprovider.NodeGroup, 0, len(cache.nodeGroups)) for id := range cache.nodeGroups { - nodeGroups = append(nodeGroups, cache.nodeGroups[id].data) + nodeGroups = append(nodeGroups, cache.nodeGroups[id]) } return nodeGroups } // GetNodeGroupForNode returns the node group for the given node. // Returns nil if either the mapping or the node group is not cached. -func (cache *IonosCache) GetNodeGroupForNode(nodeId string) cloudprovider.NodeGroup { +func (cache *IonosCache) GetNodeGroupForNode(nodeID string) cloudprovider.NodeGroup { cache.mutex.Lock() defer cache.mutex.Unlock() - id, found := cache.nodesToNodeGroups[nodeId] + nodeGroupID, found := cache.nodesToNodeGroups[nodeID] if !found { return nil } - entry, found := cache.nodeGroups[id] + nodeGroup, found := cache.nodeGroups[nodeGroupID] if !found { return nil } - return entry.data + return nodeGroup } // TryLockNodeGroup tries to write a node group lock entry. @@ -219,19 +203,3 @@ func (cache *IonosCache) InvalidateNodeGroupTargetSize(id string) { delete(cache.nodeGroupTargetSizes, id) } - -// NodeGroupNeedsRefresh returns true when the instances for the given node group have not been -// updated for more than 2 minutes. -func (cache *IonosCache) NodeGroupNeedsRefresh(id string) bool { - cache.mutex.Lock() - defer cache.mutex.Unlock() - - return timeNow().Sub(cache.nodeGroups[id].ts) > nodeGroupCacheEntryTimeout -} - -func (cache *IonosCache) updateNodeGroupTimestampNoLock(id string) { - if entry, ok := cache.nodeGroups[id]; ok { - entry.ts = timeNow() - cache.nodeGroups[id] = entry - } -} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/cache_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/cache_test.go index af6ababf673c..fbf84e38d612 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/cache_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/cache_test.go @@ -18,16 +18,11 @@ package ionoscloud import ( "testing" - "time" "github.com/stretchr/testify/require" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" ) -func newCacheEntry(data cloudprovider.NodeGroup, ts time.Time) nodeGroupCacheEntry { - return nodeGroupCacheEntry{data: data, ts: ts} -} - func TestCache_AddNodeGroup(t *testing.T) { cache := NewIonosCache() require.Empty(t, cache.GetNodeGroups()) @@ -36,17 +31,14 @@ func TestCache_AddNodeGroup(t *testing.T) { } func TestCache_RemoveInstanceFromCache(t *testing.T) { - firstTime := timeNow().Add(-2*time.Minute - 1*time.Second) cache := NewIonosCache() - cache.nodeGroups["2"] = newCacheEntry(&nodePool{id: "2"}, firstTime) + cache.nodeGroups["2"] = &nodePool{id: "2"} cache.nodesToNodeGroups["b2"] = "2" require.NotNil(t, cache.GetNodeGroupForNode("b2")) - require.True(t, cache.NodeGroupNeedsRefresh("2")) cache.RemoveInstanceFromCache("b2") require.Nil(t, cache.GetNodeGroupForNode("b2")) - require.False(t, cache.NodeGroupNeedsRefresh("2")) } func TestCache_SetInstancesCacheForNodeGroup(t *testing.T) { @@ -65,11 +57,11 @@ func TestCache_SetInstancesCacheForNodeGroup(t *testing.T) { func TestCache_GetNodeGroupIDs(t *testing.T) { cache := NewIonosCache() - require.Empty(t, cache.GetNodeGroupIds()) + require.Empty(t, cache.GetNodeGroupIDs()) cache.AddNodeGroup(&nodePool{id: "1"}) - require.Equal(t, []string{"1"}, cache.GetNodeGroupIds()) + require.Equal(t, []string{"1"}, cache.GetNodeGroupIDs()) cache.AddNodeGroup(&nodePool{id: "2"}) - require.ElementsMatch(t, []string{"1", "2"}, cache.GetNodeGroupIds()) + require.ElementsMatch(t, []string{"1", "2"}, cache.GetNodeGroupIDs()) } func TestCache_GetNodeGroups(t *testing.T) { @@ -139,22 +131,3 @@ func TestCache_GetSetNodeGroupTargetSize(t *testing.T) { require.False(t, found) require.Zero(t, size) } - -func TestCache_NodeGroupNeedsRefresh(t *testing.T) { - fixedTime := time.Now().Round(time.Second) - timeNow = func() time.Time { return fixedTime } - defer func() { timeNow = time.Now }() - - cache := NewIonosCache() - require.True(t, cache.NodeGroupNeedsRefresh("test")) - - cache.AddNodeGroup(&nodePool{id: "test"}) - require.True(t, cache.NodeGroupNeedsRefresh("test")) - cache.SetInstancesCacheForNodeGroup("test", nil) - require.False(t, cache.NodeGroupNeedsRefresh("test")) - - timeNow = func() time.Time { return fixedTime.Add(nodeGroupCacheEntryTimeout) } - require.False(t, cache.NodeGroupNeedsRefresh("test")) - timeNow = func() time.Time { return fixedTime.Add(nodeGroupCacheEntryTimeout + 1*time.Second) } - require.True(t, cache.NodeGroupNeedsRefresh("test")) -} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/client.go b/cluster-autoscaler/cloudprovider/ionoscloud/client.go index fdacff82065b..e5701c7f3c32 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/client.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/client.go @@ -20,23 +20,15 @@ import ( "context" "crypto/tls" "encoding/json" + "errors" "fmt" "net/http" "os" "path/filepath" - "time" "k8s.io/apimachinery/pkg/util/wait" ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" "k8s.io/klog/v2" - "k8s.io/utils/pointer" -) - -const ( - // K8sStateActive indicates that the cluster/nodepool resource is active. - K8sStateActive = "ACTIVE" - // K8sStateUpdating indicates that the cluster/nodepool resource is being updated. - K8sStateUpdating = "UPDATING" ) const ( @@ -65,87 +57,72 @@ type APIClient interface { } // NewAPIClient creates a new IonosCloud API client. -func NewAPIClient(token, endpoint, userAgent string, insecure bool) APIClient { - config := ionos.NewConfiguration("", "", token, endpoint) +func NewAPIClient(cfg *Config, userAgent string) APIClient { + config := ionos.NewConfiguration("", "", cfg.Token, cfg.Endpoint) if userAgent != "" { config.UserAgent = userAgent } - if insecure { + if cfg.Insecure { config.HTTPClient = &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, //nolint: gosec }, } } - config.Debug = klog.V(6).Enabled() + for key, value := range cfg.AdditionalHeaders { + config.AddDefaultHeader(key, value) + } + + setLogLevel(config) + config.Logger = klogAdapter{} // Depth > 0 is only important for listing resources. All other autoscaling related requests don't need it config.SetDepth(0) client := ionos.NewAPIClient(config) return client.KubernetesApi } -// AutoscalingClient is a client abstraction used for autoscaling. -type AutoscalingClient struct { - clientProvider - clusterId string - pollTimeout time.Duration - pollInterval time.Duration -} - -// NewAutoscalingClient contructs a new autoscaling client. -func NewAutoscalingClient(config *Config, userAgent string) (*AutoscalingClient, error) { - c := &AutoscalingClient{ - clientProvider: newClientProvider(config, userAgent), - clusterId: config.ClusterId, - pollTimeout: config.PollTimeout, - pollInterval: config.PollInterval, - } - return c, nil -} - -func newClientProvider(config *Config, userAgent string) clientProvider { - if config.Token != "" { - return defaultClientProvider{ - token: config.Token, - userAgent: userAgent, - } - } - return customClientProvider{ - cloudConfigDir: config.TokensPath, - endpoint: config.Endpoint, - userAgent: userAgent, - insecure: config.Insecure, +func setLogLevel(config *ionos.Configuration) { + switch { + case klog.V(7).Enabled(): + config.LogLevel = ionos.Trace + case klog.V(5).Enabled(): + config.LogLevel = ionos.Debug } } -// clientProvider initializes an authenticated Ionos Cloud API client using pre-configured values -type clientProvider interface { - GetClient() (APIClient, error) +type klogAdapter struct{} + +func (klogAdapter) Printf(format string, args ...interface{}) { + klog.InfofDepth(1, "IONOSLOG "+format, args...) } -type defaultClientProvider struct { - token string +// AutoscalingClient is a client abstraction used for autoscaling. +type AutoscalingClient struct { + client APIClient + cfg *Config userAgent string } -func (p defaultClientProvider) GetClient() (APIClient, error) { - return NewAPIClient(p.token, "", p.userAgent, false), nil +// NewAutoscalingClient contructs a new autoscaling client. +func NewAutoscalingClient(config *Config, userAgent string) *AutoscalingClient { + c := &AutoscalingClient{cfg: config, userAgent: userAgent} + if config.Token != "" { + c.client = NewAPIClient(config, userAgent) + } + return c } -type customClientProvider struct { - cloudConfigDir string - endpoint string - userAgent string - insecure bool -} +func (c *AutoscalingClient) getClient() (APIClient, error) { + if c.client != nil { + return c.client, nil + } -func (p customClientProvider) GetClient() (APIClient, error) { - files, err := filepath.Glob(filepath.Join(p.cloudConfigDir, "[a-zA-Z0-9]*")) + files, err := filepath.Glob(filepath.Join(c.cfg.TokensPath, "[a-zA-Z0-9]*")) if err != nil { return nil, err } if len(files) == 0 { - return nil, fmt.Errorf("missing cloud config") + return nil, errors.New("missing cloud config") } data, err := os.ReadFile(files[0]) if err != nil { @@ -160,67 +137,73 @@ func (p customClientProvider) GetClient() (APIClient, error) { if len(cloudConfig.Tokens) == 0 { return nil, fmt.Errorf("missing tokens for cloud config %s", filepath.Base(files[0])) } - return NewAPIClient(cloudConfig.Tokens[0], p.endpoint, p.userAgent, p.insecure), nil + cfg := *c.cfg + cfg.Token = cloudConfig.Tokens[0] + return NewAPIClient(&cfg, c.userAgent), nil } // GetNodePool gets a node pool. func (c *AutoscalingClient) GetNodePool(id string) (*ionos.KubernetesNodePool, error) { - client, err := c.GetClient() + client, err := c.getClient() if err != nil { return nil, err } - req := client.K8sNodepoolsFindById(context.Background(), c.clusterId, id) - nodepool, _, err := client.K8sNodepoolsFindByIdExecute(req) + req := client.K8sNodepoolsFindById(context.Background(), c.cfg.ClusterID, id) + nodepool, resp, err := client.K8sNodepoolsFindByIdExecute(req) + registerRequest("GetNodePool", resp, err) if err != nil { return nil, err } return &nodepool, nil } -func resizeRequestBody(targetSize int) ionos.KubernetesNodePoolForPut { +func resizeRequestBody(targetSize int32) ionos.KubernetesNodePoolForPut { return ionos.KubernetesNodePoolForPut{ Properties: &ionos.KubernetesNodePoolPropertiesForPut{ - NodeCount: pointer.Int32Ptr(int32(targetSize)), + NodeCount: &targetSize, }, } } // ResizeNodePool sets the target size of a node pool and starts the resize process. // The node pool target size cannot be changed until this operation finishes. -func (c *AutoscalingClient) ResizeNodePool(id string, targetSize int) error { - client, err := c.GetClient() +func (c *AutoscalingClient) ResizeNodePool(id string, targetSize int32) error { + client, err := c.getClient() if err != nil { return err } - req := client.K8sNodepoolsPut(context.Background(), c.clusterId, id) + req := client.K8sNodepoolsPut(context.Background(), c.cfg.ClusterID, id) req = req.KubernetesNodePool(resizeRequestBody(targetSize)) - _, _, err = client.K8sNodepoolsPutExecute(req) + _, resp, err := client.K8sNodepoolsPutExecute(req) + registerRequest("ResizeNodePool", resp, err) return err } // WaitForNodePoolResize polls the node pool until it is in state ACTIVE. func (c *AutoscalingClient) WaitForNodePoolResize(id string, size int) error { klog.V(1).Infof("Waiting for node pool %s to reach target size %d", id, size) - return wait.PollImmediate(c.pollInterval, c.pollTimeout, func() (bool, error) { - nodePool, err := c.GetNodePool(id) - if err != nil { - return false, fmt.Errorf("failed to fetch node pool %s: %w", id, err) - } - state := *nodePool.Metadata.State - klog.V(5).Infof("Polled node pool %s: state=%s", id, state) - return state == K8sStateActive, nil - }) + return wait.PollUntilContextTimeout(context.Background(), c.cfg.PollInterval, c.cfg.PollTimeout, true, + func(context.Context) (bool, error) { + nodePool, err := c.GetNodePool(id) + if err != nil { + return false, fmt.Errorf("failed to fetch node pool %s: %w", id, err) + } + state := *nodePool.Metadata.State + klog.V(5).Infof("Polled node pool %s: state=%s", id, state) + return state == ionos.Active, nil + }) } // ListNodes lists nodes. -func (c *AutoscalingClient) ListNodes(id string) ([]ionos.KubernetesNode, error) { - client, err := c.GetClient() +func (c *AutoscalingClient) ListNodes(nodePoolID string) ([]ionos.KubernetesNode, error) { + client, err := c.getClient() if err != nil { return nil, err } - req := client.K8sNodepoolsNodesGet(context.Background(), c.clusterId, id) + req := client.K8sNodepoolsNodesGet(context.Background(), c.cfg.ClusterID, nodePoolID) req = req.Depth(1) - nodes, _, err := client.K8sNodepoolsNodesGetExecute(req) + nodes, resp, err := client.K8sNodepoolsNodesGetExecute(req) + registerRequest("ListNodes", resp, err) if err != nil { return nil, err } @@ -228,12 +211,13 @@ func (c *AutoscalingClient) ListNodes(id string) ([]ionos.KubernetesNode, error) } // DeleteNode starts node deletion. -func (c *AutoscalingClient) DeleteNode(id, nodeId string) error { - client, err := c.GetClient() +func (c *AutoscalingClient) DeleteNode(nodePoolID, nodeID string) error { + client, err := c.getClient() if err != nil { return err } - req := client.K8sNodepoolsNodesDelete(context.Background(), c.clusterId, id, nodeId) - _, err = client.K8sNodepoolsNodesDeleteExecute(req) + req := client.K8sNodepoolsNodesDelete(context.Background(), c.cfg.ClusterID, nodePoolID, nodeID) + resp, err := client.K8sNodepoolsNodesDeleteExecute(req) + registerRequest("DeleteNode", resp, err) return err } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/client_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/client_test.go index 5e69584443f9..b45e03729217 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/client_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/client_test.go @@ -24,27 +24,24 @@ import ( "github.com/stretchr/testify/require" ) -func TestCustomClientProvider(t *testing.T) { +func TestCustomGetClient(t *testing.T) { tokensPath := t.TempDir() - require.NoError(t, os.WriteFile(filepath.Join(tokensPath, "..ignoreme"), []byte(`{"invalid"}`), 0644)) + require.NoError(t, os.WriteFile(filepath.Join(tokensPath, "..ignoreme"), []byte(`{"invalid"}`), 0o600)) - // missing files - provider := customClientProvider{tokensPath, "https://api.ionos.com", "test", true} - _, err := provider.GetClient() + client := NewAutoscalingClient(&Config{ + TokensPath: tokensPath, + Endpoint: "https://api.ionos.com", + Insecure: true, + AdditionalHeaders: map[string]string{"Foo": "Bar"}, + }, "test") + + _, err := client.getClient() require.Error(t, err) - require.NoError(t, os.WriteFile(filepath.Join(tokensPath, "a"), []byte(`{"tokens":["token1"]}`), 0644)) - require.NoError(t, os.WriteFile(filepath.Join(tokensPath, "b"), []byte(`{"tokens":["token2"]}`), 0644)) + require.NoError(t, os.WriteFile(filepath.Join(tokensPath, "a"), []byte(`{"tokens":["token1"]}`), 0o600)) + require.NoError(t, os.WriteFile(filepath.Join(tokensPath, "b"), []byte(`{"tokens":["token2"]}`), 0o600)) - c, err := provider.GetClient() + c, err := client.getClient() require.NoError(t, err) require.NotNil(t, c) } - -type fakeClientProvider struct { - client *MockAPIClient -} - -func (f fakeClientProvider) GetClient() (APIClient, error) { - return f.client, nil -} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_.go index 0b600d562a03..999b9d56f90a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" ) @@ -53,7 +53,7 @@ func (r ApiApiInfoGetRequest) XContractNumber(xContractNumber int32) ApiApiInfoG // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiApiInfoGetRequest) Filter(key string, value string) ApiApiInfoGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -74,8 +74,8 @@ func (r ApiApiInfoGetRequest) Execute() (Info, *APIResponse, error) { } /* - * ApiInfoGet Display API information - * Display API information + * ApiInfoGet Get API information + * Retrieves the API information such as API version. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiInfoGetRequest */ @@ -181,7 +181,7 @@ func (a *DefaultApiService) ApiInfoGetExecute(r ApiApiInfoGetRequest) (Info, *AP return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_application_load_balancers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_application_load_balancers.go new file mode 100644 index 000000000000..edbabd25d7c5 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_application_load_balancers.go @@ -0,0 +1,3426 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + _context "context" + "fmt" + "io" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// ApplicationLoadBalancersApiService ApplicationLoadBalancersApi service +type ApplicationLoadBalancersApiService service + +type ApiDatacentersApplicationloadbalancersDeleteRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersDeleteRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersDeleteRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersDeleteRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Execute() (*APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersDeleteExecute(r) +} + +/* + * DatacentersApplicationloadbalancersDelete Delete an Application Load Balancer by ID + * Removes the specified Application Load Balancer from the data center. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersDeleteRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersDelete(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersDeleteRequest { + return ApiDatacentersApplicationloadbalancersDeleteRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + } +} + +/* + * Execute executes the request + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersDeleteExecute(r ApiDatacentersApplicationloadbalancersDeleteRequest) (*APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersDelete") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersDelete", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarAPIResponse, newErr + } + newErr.model = v + return localVarAPIResponse, newErr + } + + return localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId Get an Application Load Balancer by ID + * Retrieves the properties of the specified Application Load Balancer within the data center. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { + return ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancer + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdExecute(r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) (ApplicationLoadBalancer, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + flowLogId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Execute() (*APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFlowlogsDeleteExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFlowlogsDelete Delete an ALB Flow Log by ID + * Deletes the Application Load Balancer flow log specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param flowLogId The unique ID of the flow log. + * @return ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsDelete(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { + return ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + flowLogId: flowLogId, + } +} + +/* + * Execute executes the request + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsDeleteExecute(r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) (*APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsDelete") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFlowlogsDelete", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarAPIResponse, newErr + } + newErr.model = v + return localVarAPIResponse, newErr + } + + return localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + flowLogId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Execute() (FlowLog, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId Get an ALB Flow Log by ID + * Retrieves the Application Load Balancer flow log specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param flowLogId The unique ID of the flow log. + * @return ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { + return ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + flowLogId: flowLogId, + } +} + +/* + * Execute executes the request + * @return FlowLog + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdExecute(r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) (FlowLog, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlowLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFlowlogsGetRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + filters _neturl.Values + orderBy *string + maxResults *int32 + datacenterId string + applicationLoadBalancerId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + r.xContractNumber = &xContractNumber + return r +} + +// Filters query parameters limit results to those containing a matching value for a specific property. +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + filterKey := fmt.Sprintf(FilterQueryParam, key) + r.filters[filterKey] = append(r.filters[filterKey], value) + return r +} + +// OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) OrderBy(orderBy string) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + r.orderBy = &orderBy + return r +} + +// MaxResults query param limits the number of results returned. +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) MaxResults(maxResults int32) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + r.maxResults = &maxResults + return r +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Execute() (FlowLogs, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFlowlogsGetExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFlowlogsGet Get ALB Flow Logs + * Retrieves the flow logs for the specified Application Load Balancer. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersFlowlogsGetRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsGet(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { + return ApiDatacentersApplicationloadbalancersFlowlogsGetRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + filters: _neturl.Values{}, + } +} + +/* + * Execute executes the request + * @return FlowLogs + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsGetExecute(r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) (FlowLogs, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlowLogs + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsGet") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + if r.orderBy != nil { + localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) + } + if r.maxResults != nil { + localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) + } + if len(r.filters) > 0 { + for k, v := range r.filters { + for _, iv := range v { + localVarQueryParams.Add(k, iv) + } + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFlowlogsGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + flowLogId string + applicationLoadBalancerFlowLogProperties *FlowLogProperties + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) ApplicationLoadBalancerFlowLogProperties(applicationLoadBalancerFlowLogProperties FlowLogProperties) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { + r.applicationLoadBalancerFlowLogProperties = &applicationLoadBalancerFlowLogProperties + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Execute() (FlowLog, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFlowlogsPatchExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFlowlogsPatch Partially Modify an ALB Flow Log by ID + * Updates the properties of the Application Load Balancer flow log specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param flowLogId The unique ID of the flow log. + * @return ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPatch(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { + return ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + flowLogId: flowLogId, + } +} + +/* + * Execute executes the request + * @return FlowLog + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPatchExecute(r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) (FlowLog, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlowLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsPatch") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerFlowLogProperties == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerFlowLogProperties is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerFlowLogProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFlowlogsPatch", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFlowlogsPostRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + applicationLoadBalancerFlowLog *FlowLog + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog FlowLog) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { + r.applicationLoadBalancerFlowLog = &applicationLoadBalancerFlowLog + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Execute() (FlowLog, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFlowlogsPostExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFlowlogsPost Create an ALB Flow Log + * Creates a flow log for the Application Load Balancer specified by ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersFlowlogsPostRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPost(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { + return ApiDatacentersApplicationloadbalancersFlowlogsPostRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + } +} + +/* + * Execute executes the request + * @return FlowLog + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPostExecute(r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) (FlowLog, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlowLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsPost") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerFlowLog == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerFlowLog is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerFlowLog + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFlowlogsPost", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersFlowlogsPutRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + flowLogId string + applicationLoadBalancerFlowLog *FlowLogPut + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog FlowLogPut) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { + r.applicationLoadBalancerFlowLog = &applicationLoadBalancerFlowLog + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Execute() (FlowLog, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersFlowlogsPutExecute(r) +} + +/* + * DatacentersApplicationloadbalancersFlowlogsPut Modify an ALB Flow Log by ID + * Modifies the Application Load Balancer flow log specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param flowLogId The unique ID of the flow log. + * @return ApiDatacentersApplicationloadbalancersFlowlogsPutRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPut(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { + return ApiDatacentersApplicationloadbalancersFlowlogsPutRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + flowLogId: flowLogId, + } +} + +/* + * Execute executes the request + * @return FlowLog + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPutExecute(r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) (FlowLog, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue FlowLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsPut") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerFlowLog == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerFlowLog is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerFlowLog + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersFlowlogsPut", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + forwardingRuleId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Execute() (*APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesDeleteExecute(r) +} + +/* + * DatacentersApplicationloadbalancersForwardingrulesDelete Delete an ALB Forwarding Rule by ID + * Deletes the Application Load Balancer forwarding rule specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param forwardingRuleId The unique ID of the forwarding rule. + * @return ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesDelete(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { + return ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + forwardingRuleId: forwardingRuleId, + } +} + +/* + * Execute executes the request + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesDeleteExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) (*APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesDelete") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersForwardingrulesDelete", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarAPIResponse, newErr + } + newErr.model = v + return localVarAPIResponse, newErr + } + + return localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + forwardingRuleId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdExecute(r) +} + +/* + * DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId Get an ALB Forwarding Rule by ID + * Retrieves the Application Load Balancer forwarding rule specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param forwardingRuleId The unique ID of the forwarding rule. + * @return ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { + return ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + forwardingRuleId: forwardingRuleId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancerForwardingRule + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancerForwardingRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + filters _neturl.Values + orderBy *string + maxResults *int32 + datacenterId string + applicationLoadBalancerId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + r.xContractNumber = &xContractNumber + return r +} + +// Filters query parameters limit results to those containing a matching value for a specific property. +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Filter(key string, value string) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + filterKey := fmt.Sprintf(FilterQueryParam, key) + r.filters[filterKey] = append(r.filters[filterKey], value) + return r +} + +// OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) OrderBy(orderBy string) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + r.orderBy = &orderBy + return r +} + +// MaxResults query param limits the number of results returned. +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) MaxResults(maxResults int32) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + r.maxResults = &maxResults + return r +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Execute() (ApplicationLoadBalancerForwardingRules, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesGetExecute(r) +} + +/* + * DatacentersApplicationloadbalancersForwardingrulesGet Get ALB Forwarding Rules + * Lists the forwarding rules of the specified Application Load Balancer. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesGet(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { + return ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + filters: _neturl.Values{}, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancerForwardingRules + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesGetExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) (ApplicationLoadBalancerForwardingRules, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancerForwardingRules + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesGet") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + if r.orderBy != nil { + localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) + } + if r.maxResults != nil { + localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) + } + if len(r.filters) > 0 { + for k, v := range r.filters { + for _, iv := range v { + localVarQueryParams.Add(k, iv) + } + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersForwardingrulesGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + forwardingRuleId string + applicationLoadBalancerForwardingRuleProperties *ApplicationLoadBalancerForwardingRuleProperties + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) ApplicationLoadBalancerForwardingRuleProperties(applicationLoadBalancerForwardingRuleProperties ApplicationLoadBalancerForwardingRuleProperties) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { + r.applicationLoadBalancerForwardingRuleProperties = &applicationLoadBalancerForwardingRuleProperties + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesPatchExecute(r) +} + +/* + * DatacentersApplicationloadbalancersForwardingrulesPatch Partially modify an ALB Forwarding Rule by ID + * Updates the properties of the Application Load Balancer forwarding rule specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param forwardingRuleId The unique ID of the forwarding rule. + * @return ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPatch(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { + return ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + forwardingRuleId: forwardingRuleId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancerForwardingRule + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPatchExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancerForwardingRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesPatch") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerForwardingRuleProperties == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerForwardingRuleProperties is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerForwardingRuleProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersForwardingrulesPatch", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + applicationLoadBalancerForwardingRule *ApplicationLoadBalancerForwardingRule + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule ApplicationLoadBalancerForwardingRule) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { + r.applicationLoadBalancerForwardingRule = &applicationLoadBalancerForwardingRule + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesPostExecute(r) +} + +/* + * DatacentersApplicationloadbalancersForwardingrulesPost Create an ALB Forwarding Rule + * Creates a forwarding rule for the specified Application Load Balancer. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPost(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { + return ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancerForwardingRule + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPostExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancerForwardingRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesPost") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerForwardingRule == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerForwardingRule is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerForwardingRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersForwardingrulesPost", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + forwardingRuleId string + applicationLoadBalancerForwardingRule *ApplicationLoadBalancerForwardingRulePut + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule ApplicationLoadBalancerForwardingRulePut) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { + r.applicationLoadBalancerForwardingRule = &applicationLoadBalancerForwardingRule + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesPutExecute(r) +} + +/* + * DatacentersApplicationloadbalancersForwardingrulesPut Modify an ALB Forwarding Rule by ID + * Modifies the Application Load Balancer forwarding rule specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @param forwardingRuleId The unique ID of the forwarding rule. + * @return ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPut(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { + return ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + forwardingRuleId: forwardingRuleId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancerForwardingRule + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPutExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancerForwardingRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesPut") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerForwardingRule == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerForwardingRule is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerForwardingRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersForwardingrulesPut", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersGetRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + filters _neturl.Values + orderBy *string + maxResults *int32 + datacenterId string + pretty *bool + depth *int32 + xContractNumber *int32 + offset *int32 + limit *int32 +} + +func (r ApiDatacentersApplicationloadbalancersGetRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersGetRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersGetRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersGetRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersGetRequest { + r.xContractNumber = &xContractNumber + return r +} +func (r ApiDatacentersApplicationloadbalancersGetRequest) Offset(offset int32) ApiDatacentersApplicationloadbalancersGetRequest { + r.offset = &offset + return r +} +func (r ApiDatacentersApplicationloadbalancersGetRequest) Limit(limit int32) ApiDatacentersApplicationloadbalancersGetRequest { + r.limit = &limit + return r +} + +// Filters query parameters limit results to those containing a matching value for a specific property. +func (r ApiDatacentersApplicationloadbalancersGetRequest) Filter(key string, value string) ApiDatacentersApplicationloadbalancersGetRequest { + filterKey := fmt.Sprintf(FilterQueryParam, key) + r.filters[filterKey] = append(r.filters[filterKey], value) + return r +} + +// OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. +func (r ApiDatacentersApplicationloadbalancersGetRequest) OrderBy(orderBy string) ApiDatacentersApplicationloadbalancersGetRequest { + r.orderBy = &orderBy + return r +} + +// MaxResults query param limits the number of results returned. +func (r ApiDatacentersApplicationloadbalancersGetRequest) MaxResults(maxResults int32) ApiDatacentersApplicationloadbalancersGetRequest { + r.maxResults = &maxResults + return r +} + +func (r ApiDatacentersApplicationloadbalancersGetRequest) Execute() (ApplicationLoadBalancers, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersGetExecute(r) +} + +/* + * DatacentersApplicationloadbalancersGet Get Application Load Balancers + * Lists all Application Load Balancers within a data center. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @return ApiDatacentersApplicationloadbalancersGetRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersGet(ctx _context.Context, datacenterId string) ApiDatacentersApplicationloadbalancersGetRequest { + return ApiDatacentersApplicationloadbalancersGetRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + filters: _neturl.Values{}, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancers + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersGetExecute(r ApiDatacentersApplicationloadbalancersGetRequest) (ApplicationLoadBalancers, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancers + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersGet") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") + if defaultQueryParam == "" { + localVarQueryParams.Add("offset", parameterToString(0, "")) + } + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") + if defaultQueryParam == "" { + localVarQueryParams.Add("limit", parameterToString(1000, "")) + } + } + if r.orderBy != nil { + localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) + } + if r.maxResults != nil { + localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) + } + if len(r.filters) > 0 { + for k, v := range r.filters { + for _, iv := range v { + localVarQueryParams.Add(k, iv) + } + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersPatchRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + applicationLoadBalancerProperties *ApplicationLoadBalancerProperties + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersPatchRequest) ApplicationLoadBalancerProperties(applicationLoadBalancerProperties ApplicationLoadBalancerProperties) ApiDatacentersApplicationloadbalancersPatchRequest { + r.applicationLoadBalancerProperties = &applicationLoadBalancerProperties + return r +} +func (r ApiDatacentersApplicationloadbalancersPatchRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersPatchRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersPatchRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersPatchRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersPatchRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersPatchRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersPatchExecute(r) +} + +/* + * DatacentersApplicationloadbalancersPatch Partially Modify an Application Load Balancer by ID + * Updates the properties of the specified Application Load Balancer within the data center. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersPatchRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPatch(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersPatchRequest { + return ApiDatacentersApplicationloadbalancersPatchRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancer + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPatchExecute(r ApiDatacentersApplicationloadbalancersPatchRequest) (ApplicationLoadBalancer, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersPatch") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancerProperties == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancerProperties is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancerProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersPatch", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersPostRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancer *ApplicationLoadBalancer + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersPostRequest) ApplicationLoadBalancer(applicationLoadBalancer ApplicationLoadBalancer) ApiDatacentersApplicationloadbalancersPostRequest { + r.applicationLoadBalancer = &applicationLoadBalancer + return r +} +func (r ApiDatacentersApplicationloadbalancersPostRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersPostRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersPostRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersPostRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersPostRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersPostRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersPostExecute(r) +} + +/* + * DatacentersApplicationloadbalancersPost Create an Application Load Balancer + * Creates an Application Load Balancer within the data center. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @return ApiDatacentersApplicationloadbalancersPostRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPost(ctx _context.Context, datacenterId string) ApiDatacentersApplicationloadbalancersPostRequest { + return ApiDatacentersApplicationloadbalancersPostRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancer + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPostExecute(r ApiDatacentersApplicationloadbalancersPostRequest) (ApplicationLoadBalancer, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersPost") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancer == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancer is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancer + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersPost", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiDatacentersApplicationloadbalancersPutRequest struct { + ctx _context.Context + ApiService *ApplicationLoadBalancersApiService + datacenterId string + applicationLoadBalancerId string + applicationLoadBalancer *ApplicationLoadBalancerPut + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiDatacentersApplicationloadbalancersPutRequest) ApplicationLoadBalancer(applicationLoadBalancer ApplicationLoadBalancerPut) ApiDatacentersApplicationloadbalancersPutRequest { + r.applicationLoadBalancer = &applicationLoadBalancer + return r +} +func (r ApiDatacentersApplicationloadbalancersPutRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersPutRequest { + r.pretty = &pretty + return r +} +func (r ApiDatacentersApplicationloadbalancersPutRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersPutRequest { + r.depth = &depth + return r +} +func (r ApiDatacentersApplicationloadbalancersPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersPutRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiDatacentersApplicationloadbalancersPutRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { + return r.ApiService.DatacentersApplicationloadbalancersPutExecute(r) +} + +/* + * DatacentersApplicationloadbalancersPut Modify an Application Load Balancer by ID + * Modifies the properties of the specified Application Load Balancer within the data center. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. + * @return ApiDatacentersApplicationloadbalancersPutRequest + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPut(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersPutRequest { + return ApiDatacentersApplicationloadbalancersPutRequest{ + ApiService: a, + ctx: ctx, + datacenterId: datacenterId, + applicationLoadBalancerId: applicationLoadBalancerId, + } +} + +/* + * Execute executes the request + * @return ApplicationLoadBalancer + */ +func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPutExecute(r ApiDatacentersApplicationloadbalancersPutRequest) (ApplicationLoadBalancer, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApplicationLoadBalancer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersPut") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.applicationLoadBalancer == nil { + return localVarReturnValue, nil, reportError("applicationLoadBalancer is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.applicationLoadBalancer + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "DatacentersApplicationloadbalancersPut", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_backup_units.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_backup_units.go index 91b0b962a535..8337e9d1a805 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_backup_units.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_backup_units.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -168,7 +168,7 @@ func (a *BackupUnitsApiService) BackupunitsDeleteExecute(r ApiBackupunitsDeleteR return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -331,7 +331,7 @@ func (a *BackupUnitsApiService) BackupunitsFindByIdExecute(r ApiBackupunitsFindB return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -394,7 +394,7 @@ func (r ApiBackupunitsGetRequest) XContractNumber(xContractNumber int32) ApiBack // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiBackupunitsGetRequest) Filter(key string, value string) ApiBackupunitsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -536,7 +536,7 @@ func (a *BackupUnitsApiService) BackupunitsGetExecute(r ApiBackupunitsGetRequest return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -719,7 +719,7 @@ func (a *BackupUnitsApiService) BackupunitsPatchExecute(r ApiBackupunitsPatchReq return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -898,7 +898,7 @@ func (a *BackupUnitsApiService) BackupunitsPostExecute(r ApiBackupunitsPostReque return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1081,7 +1081,7 @@ func (a *BackupUnitsApiService) BackupunitsPutExecute(r ApiBackupunitsPutRequest return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1140,7 +1140,7 @@ func (r ApiBackupunitsSsourlGetRequest) XContractNumber(xContractNumber int32) A // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiBackupunitsSsourlGetRequest) Filter(key string, value string) ApiBackupunitsSsourlGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1277,7 +1277,7 @@ func (a *BackupUnitsApiService) BackupunitsSsourlGetExecute(r ApiBackupunitsSsou return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_contract_resources.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_contract_resources.go index 29b31390a035..ef19e758feef 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_contract_resources.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_contract_resources.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" ) @@ -53,7 +53,7 @@ func (r ApiContractsGetRequest) XContractNumber(xContractNumber int32) ApiContra // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiContractsGetRequest) Filter(key string, value string) ApiContractsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -74,8 +74,8 @@ func (r ApiContractsGetRequest) Execute() (Contracts, *APIResponse, error) { } /* - * ContractsGet Retrieve contracts - * Retrieve the properties of the user's contract. In this version, the resource became a collection. + * ContractsGet Get Contract Information + * Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiContractsGetRequest */ @@ -195,7 +195,7 @@ func (a *ContractResourcesApiService) ContractsGetExecute(r ApiContractsGetReque return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_data_centers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_data_centers.go index 5303ab6d423d..33eb56488b57 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_data_centers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_data_centers.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -162,7 +162,7 @@ func (a *DataCentersApiService) DatacentersDeleteExecute(r ApiDatacentersDeleteR return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -325,7 +325,7 @@ func (a *DataCentersApiService) DatacentersFindByIdExecute(r ApiDatacentersFindB return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -398,7 +398,7 @@ func (r ApiDatacentersGetRequest) Limit(limit int32) ApiDatacentersGetRequest { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersGetRequest) Filter(key string, value string) ApiDatacentersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -556,7 +556,7 @@ func (a *DataCentersApiService) DatacentersGetExecute(r ApiDatacentersGetRequest return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -624,8 +624,8 @@ func (r ApiDatacentersPatchRequest) Execute() (Datacenter, *APIResponse, error) } /* - * DatacentersPatch Partially modify data centers - * Update the properties of the specified data center, rename it, or change the description. + * DatacentersPatch Partially modify a Data Center by ID + * Updates the properties of the specified data center, rename it, or change the description. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersPatchRequest @@ -739,7 +739,7 @@ func (a *DataCentersApiService) DatacentersPatchExecute(r ApiDatacentersPatchReq return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -806,8 +806,8 @@ func (r ApiDatacentersPostRequest) Execute() (Datacenter, *APIResponse, error) { } /* - - DatacentersPost Create data centers - - Create new data centers, and data centers that already contain elements, such as servers and storage volumes. + - DatacentersPost Create a Data Center + - Creates new data centers, and data centers that already contain elements, such as servers and storage volumes. Virtual data centers are the foundation of the platform; they act as logical containers for all other objects you create, such as servers and storage volumes. You can provision as many data centers as needed. Data centers have their own private networks and are logically segmented from each other to create isolation. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -920,7 +920,7 @@ func (a *DataCentersApiService) DatacentersPostExecute(r ApiDatacentersPostReque return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -988,8 +988,8 @@ func (r ApiDatacentersPutRequest) Execute() (Datacenter, *APIResponse, error) { } /* - * DatacentersPut Modify data centers - * Modify the properties of the specified data center, rename it, or change the description. + * DatacentersPut Modify a Data Center by ID + * Modifies the properties of the specified data center, rename it, or change the description. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersPutRequest @@ -1103,7 +1103,7 @@ func (a *DataCentersApiService) DatacentersPutExecute(r ApiDatacentersPutRequest return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_firewall_rules.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_firewall_rules.go index d6989cdef7c0..1e0354a734f7 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_firewall_rules.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_firewall_rules.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -174,7 +174,7 @@ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesDeleteExecu return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -349,7 +349,7 @@ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesFindByIdExe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -425,7 +425,7 @@ func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Limit(limit int32) Api // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Filter(key string, value string) ApiDatacentersServersNicsFirewallrulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -592,7 +592,7 @@ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesGetExecute( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -787,7 +787,7 @@ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPatchExecut return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -857,8 +857,8 @@ func (r ApiDatacentersServersNicsFirewallrulesPostRequest) Execute() (FirewallRu } /* - * DatacentersServersNicsFirewallrulesPost Create firewall rules - * Create a firewall rule for the specified NIC. + * DatacentersServersNicsFirewallrulesPost Create a Firewall Rule + * Creates a firewall rule for the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -978,7 +978,7 @@ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPostExecute return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1049,8 +1049,8 @@ func (r ApiDatacentersServersNicsFirewallrulesPutRequest) Execute() (FirewallRul } /* - * DatacentersServersNicsFirewallrulesPut Modify firewall rules - * Modify the properties of the specified firewall rule. + * DatacentersServersNicsFirewallrulesPut Modify a Firewall Rule + * Modifies the properties of the specified firewall rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -1173,7 +1173,7 @@ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPutExecute( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_flow_logs.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_flow_logs.go index e4cf682dc1d6..6518b745100d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_flow_logs.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_flow_logs.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -166,7 +166,7 @@ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsDeleteExecute(r ApiDa return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -333,7 +333,7 @@ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsFindByIdExecute(r Api return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -404,7 +404,7 @@ func (r ApiDatacentersServersNicsFlowlogsGetRequest) Limit(limit int32) ApiDatac // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersNicsFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersServersNicsFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -568,7 +568,7 @@ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsGetExecute(r ApiDatac return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -755,7 +755,7 @@ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPatchExecute(r ApiDat return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -820,8 +820,8 @@ func (r ApiDatacentersServersNicsFlowlogsPostRequest) Execute() (FlowLog, *APIRe } /* - * DatacentersServersNicsFlowlogsPost Create Flow Logs - * Add a new Flow Log for the specified NIC. + * DatacentersServersNicsFlowlogsPost Create a Flow Log + * Adds a new Flow Log for the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -938,7 +938,7 @@ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPostExecute(r ApiData return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1125,7 +1125,7 @@ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPutExecute(r ApiDatac return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_images.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_images.go index 1c291fe309d2..479f353ea8f1 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_images.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_images.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -162,7 +162,7 @@ func (a *ImagesApiService) ImagesDeleteExecute(r ApiImagesDeleteRequest) (*APIRe return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -325,7 +325,7 @@ func (a *ImagesApiService) ImagesFindByIdExecute(r ApiImagesFindByIdRequest) (Im return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -388,7 +388,7 @@ func (r ApiImagesGetRequest) XContractNumber(xContractNumber int32) ApiImagesGet // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiImagesGetRequest) Filter(key string, value string) ApiImagesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -530,7 +530,7 @@ func (a *ImagesApiService) ImagesGetExecute(r ApiImagesGetRequest) (Images, *API return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -713,7 +713,7 @@ func (a *ImagesApiService) ImagesPatchExecute(r ApiImagesPatchRequest) (Image, * return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -781,8 +781,8 @@ func (r ApiImagesPutRequest) Execute() (Image, *APIResponse, error) { } /* - * ImagesPut Modify images - * Modify the properties of the specified image. + * ImagesPut Modify an Image by ID + * Modifies the properties of the specified image. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @return ApiImagesPutRequest @@ -896,7 +896,7 @@ func (a *ImagesApiService) ImagesPutExecute(r ApiImagesPutRequest) (Image, *APIR return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_ip_blocks.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_ip_blocks.go index 211cc0b7626a..f5269e97a15c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_ip_blocks.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_ip_blocks.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -162,7 +162,7 @@ func (a *IPBlocksApiService) IpblocksDeleteExecute(r ApiIpblocksDeleteRequest) ( return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -325,7 +325,7 @@ func (a *IPBlocksApiService) IpblocksFindByIdExecute(r ApiIpblocksFindByIdReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -398,7 +398,7 @@ func (r ApiIpblocksGetRequest) Limit(limit int32) ApiIpblocksGetRequest { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiIpblocksGetRequest) Filter(key string, value string) ApiIpblocksGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -556,7 +556,7 @@ func (a *IPBlocksApiService) IpblocksGetExecute(r ApiIpblocksGetRequest) (IpBloc return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -739,7 +739,7 @@ func (a *IPBlocksApiService) IpblocksPatchExecute(r ApiIpblocksPatchRequest) (Ip return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -806,8 +806,8 @@ func (r ApiIpblocksPostRequest) Execute() (IpBlock, *APIResponse, error) { } /* - * IpblocksPost Reserve IP blocks - * Reserve a new IP block. + * IpblocksPost Reserve a IP Block + * Reserves a new IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiIpblocksPostRequest */ @@ -918,7 +918,7 @@ func (a *IPBlocksApiService) IpblocksPostExecute(r ApiIpblocksPostRequest) (IpBl return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -986,8 +986,8 @@ func (r ApiIpblocksPutRequest) Execute() (IpBlock, *APIResponse, error) { } /* - * IpblocksPut Modify IP blocks - * Modify the properties of the specified IP block. + * IpblocksPut Modify a IP Block by ID + * Modifies the properties of the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksPutRequest @@ -1101,7 +1101,7 @@ func (a *IPBlocksApiService) IpblocksPutExecute(r ApiIpblocksPutRequest) (IpBloc return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_kubernetes.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_kubernetes.go index c5390dd16bb5..8deae22fe942 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_kubernetes.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_kubernetes.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -54,8 +54,8 @@ func (r ApiK8sDeleteRequest) Execute() (*APIResponse, error) { } /* - * K8sDelete Delete Kubernetes clusters - * Delete the specified Kubernetes cluster. + * K8sDelete Delete a Kubernetes Cluster by ID + * Deletes the K8s cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sDeleteRequest @@ -162,7 +162,7 @@ func (a *KubernetesApiService) K8sDeleteExecute(r ApiK8sDeleteRequest) (*APIResp return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -215,10 +215,10 @@ func (r ApiK8sFindByClusterIdRequest) Execute() (KubernetesCluster, *APIResponse } /* - * K8sFindByClusterId Retrieve Kubernetes clusters - * Retrieve the specified Kubernetes cluster. + * K8sFindByClusterId Get a Kubernetes Cluster by ID + * Retrieves the K8s cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param k8sClusterId The unique ID of the Kubernetes cluster. + * @param k8sClusterId The unique ID of the K8s cluster to be retrieved. * @return ApiK8sFindByClusterIdRequest */ func (a *KubernetesApiService) K8sFindByClusterId(ctx _context.Context, k8sClusterId string) ApiK8sFindByClusterIdRequest { @@ -325,7 +325,7 @@ func (a *KubernetesApiService) K8sFindByClusterIdExecute(r ApiK8sFindByClusterId return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -388,7 +388,7 @@ func (r ApiK8sGetRequest) XContractNumber(xContractNumber int32) ApiK8sGetReques // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sGetRequest) Filter(key string, value string) ApiK8sGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -409,8 +409,8 @@ func (r ApiK8sGetRequest) Execute() (KubernetesClusters, *APIResponse, error) { } /* - * K8sGet List Kubernetes clusters - * List all available Kubernetes clusters. + * K8sGet Get Kubernetes Clusters + * Retrieves a list of all K8s clusters provisioned under your account. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sGetRequest */ @@ -530,7 +530,7 @@ func (a *KubernetesApiService) K8sGetExecute(r ApiK8sGetRequest) (KubernetesClus return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -594,7 +594,7 @@ func (r ApiK8sKubeconfigGetRequest) XContractNumber(xContractNumber int32) ApiK8 // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sKubeconfigGetRequest) Filter(key string, value string) ApiK8sKubeconfigGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -615,8 +615,8 @@ func (r ApiK8sKubeconfigGetRequest) Execute() (string, *APIResponse, error) { } /* - * K8sKubeconfigGet Retrieve Kubernetes configuration files - * Retrieve a configuration file for the specified Kubernetes cluster, in YAML or JSON format as defined in the Accept header; the default Accept header is application/yaml. + * K8sKubeconfigGet Get Kubernetes Configuration File + * Retrieves the configuration file for the specified K8s cluster. You can define the format (YAML or JSON) of the returned file in the Accept header. By default, 'application/yaml' is specified. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sKubeconfigGetRequest @@ -739,7 +739,7 @@ func (a *KubernetesApiService) K8sKubeconfigGetExecute(r ApiK8sKubeconfigGetRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -803,8 +803,8 @@ func (r ApiK8sNodepoolsDeleteRequest) Execute() (*APIResponse, error) { } /* - * K8sNodepoolsDelete Delete Kubernetes node pools - * Delete the specified Kubernetes node pool. + * K8sNodepoolsDelete Delete a Kubernetes Node Pool by ID + * Deletes the K8s node pool specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. @@ -914,7 +914,7 @@ func (a *KubernetesApiService) K8sNodepoolsDeleteExecute(r ApiK8sNodepoolsDelete return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -968,8 +968,8 @@ func (r ApiK8sNodepoolsFindByIdRequest) Execute() (KubernetesNodePool, *APIRespo } /* - * K8sNodepoolsFindById Retrieve Kubernetes node pools - * Retrieve the specified Kubernetes node pool. + * K8sNodepoolsFindById Get a Kubernetes Node Pool by ID + * Retrieves the K8s node pool specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. @@ -1081,7 +1081,7 @@ func (a *KubernetesApiService) K8sNodepoolsFindByIdExecute(r ApiK8sNodepoolsFind return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1145,7 +1145,7 @@ func (r ApiK8sNodepoolsGetRequest) XContractNumber(xContractNumber int32) ApiK8s // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sNodepoolsGetRequest) Filter(key string, value string) ApiK8sNodepoolsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1166,8 +1166,8 @@ func (r ApiK8sNodepoolsGetRequest) Execute() (KubernetesNodePools, *APIResponse, } /* - * K8sNodepoolsGet List Kubernetes node pools - * List all Kubernetes node pools, included the specified Kubernetes cluster. + * K8sNodepoolsGet Get Kubernetes Node Pools + * Retrieves a list of K8s node pools of a cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sNodepoolsGetRequest @@ -1290,7 +1290,7 @@ func (a *KubernetesApiService) K8sNodepoolsGetExecute(r ApiK8sNodepoolsGetReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1355,8 +1355,8 @@ func (r ApiK8sNodepoolsNodesDeleteRequest) Execute() (*APIResponse, error) { } /* - * K8sNodepoolsNodesDelete Delete Kubernetes nodes - * Delete the specified Kubernetes node. + * K8sNodepoolsNodesDelete Delete a Kubernetes Node by ID + * Deletes the K8s node specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. @@ -1469,7 +1469,7 @@ func (a *KubernetesApiService) K8sNodepoolsNodesDeleteExecute(r ApiK8sNodepoolsN return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1524,8 +1524,8 @@ func (r ApiK8sNodepoolsNodesFindByIdRequest) Execute() (KubernetesNode, *APIResp } /* - * K8sNodepoolsNodesFindById Retrieve Kubernetes nodes - * Retrieve the specified Kubernetes node. + * K8sNodepoolsNodesFindById Get Kubernetes Node by ID + * Retrieves the K8s node specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. @@ -1640,7 +1640,7 @@ func (a *KubernetesApiService) K8sNodepoolsNodesFindByIdExecute(r ApiK8sNodepool return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1705,7 +1705,7 @@ func (r ApiK8sNodepoolsNodesGetRequest) XContractNumber(xContractNumber int32) A // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sNodepoolsNodesGetRequest) Filter(key string, value string) ApiK8sNodepoolsNodesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1726,8 +1726,8 @@ func (r ApiK8sNodepoolsNodesGetRequest) Execute() (KubernetesNodes, *APIResponse } /* - * K8sNodepoolsNodesGet List Kubernetes nodes - * List all the nodes, included in the specified Kubernetes node pool. + * K8sNodepoolsNodesGet Get Kubernetes Nodes + * Retrieves the list of all K8s nodes of the specified node pool. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. @@ -1853,7 +1853,7 @@ func (a *KubernetesApiService) K8sNodepoolsNodesGetExecute(r ApiK8sNodepoolsNode return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1918,10 +1918,10 @@ func (r ApiK8sNodepoolsNodesReplacePostRequest) Execute() (*APIResponse, error) } /* - - K8sNodepoolsNodesReplacePost Recreate Kubernetes nodes - - Recreate the specified Kubernetes node. + - K8sNodepoolsNodesReplacePost Recreate a Kubernetes Node by ID + - Recreates the K8s node specified by its ID. -A new node is created and configured by Managed Kubernetes, based on the node pool template. Once the status is "Active", all the pods are migrated from the faulty node, which is then deleted once empty. During this operation, the node pool will have an additional billable "Active" node. +If a node becomes unusable, Managed Kubernetes allows you to recreate it with a configuration based on the node pool template. Once the status is 'Active,' all the pods from the failed node will be migrated to the new node. The node pool has an additional billable 'active' node during this process. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param k8sClusterId The unique ID of the Kubernetes cluster. - @param nodepoolId The unique ID of the Kubernetes node pool. @@ -2034,7 +2034,7 @@ func (a *KubernetesApiService) K8sNodepoolsNodesReplacePostExecute(r ApiK8sNodep return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2092,8 +2092,8 @@ func (r ApiK8sNodepoolsPostRequest) Execute() (KubernetesNodePool, *APIResponse, } /* - * K8sNodepoolsPost Create Kubernetes node pools - * Create a Kubernetes node pool inside the specified Kubernetes cluster. + * K8sNodepoolsPost Create a Kubernetes Node Pool + * Creates a node pool inside the specified K8s cluster. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sNodepoolsPostRequest @@ -2207,7 +2207,7 @@ func (a *KubernetesApiService) K8sNodepoolsPostExecute(r ApiK8sNodepoolsPostRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2276,8 +2276,8 @@ func (r ApiK8sNodepoolsPutRequest) Execute() (KubernetesNodePool, *APIResponse, } /* - * K8sNodepoolsPut Modify Kubernetes node pools - * Modify the specified Kubernetes node pool. + * K8sNodepoolsPut Modify a Kubernetes Node Pool by ID + * Modifies the K8s node pool specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. @@ -2394,7 +2394,7 @@ func (a *KubernetesApiService) K8sNodepoolsPutExecute(r ApiK8sNodepoolsPutReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2461,8 +2461,8 @@ func (r ApiK8sPostRequest) Execute() (KubernetesCluster, *APIResponse, error) { } /* - * K8sPost Create Kubernetes clusters - * Create a Kubernetes cluster. + * K8sPost Create a Kubernetes Cluster + * Creates a K8s cluster provisioned under your account. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sPostRequest */ @@ -2573,7 +2573,7 @@ func (a *KubernetesApiService) K8sPostExecute(r ApiK8sPostRequest) (KubernetesCl return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2641,8 +2641,8 @@ func (r ApiK8sPutRequest) Execute() (KubernetesCluster, *APIResponse, error) { } /* - * K8sPut Modify Kubernetes clusters - * Modify the specified Kubernetes cluster. + * K8sPut Modify a Kubernetes Cluster by ID + * Modifies the K8s cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sPutRequest @@ -2756,7 +2756,7 @@ func (a *KubernetesApiService) K8sPutExecute(r ApiK8sPutRequest) (KubernetesClus return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2803,7 +2803,7 @@ type ApiK8sVersionsDefaultGetRequest struct { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sVersionsDefaultGetRequest) Filter(key string, value string) ApiK8sVersionsDefaultGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2824,8 +2824,8 @@ func (r ApiK8sVersionsDefaultGetRequest) Execute() (string, *APIResponse, error) } /* - * K8sVersionsDefaultGet Retrieve current default Kubernetes version - * Retrieve current default Kubernetes version for clusters and nodepools. + * K8sVersionsDefaultGet Get Default Kubernetes Version + * Retrieves the current default K8s version to be used by the clusters and node pools. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sVersionsDefaultGetRequest */ @@ -2926,7 +2926,7 @@ func (a *KubernetesApiService) K8sVersionsDefaultGetExecute(r ApiK8sVersionsDefa return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2973,7 +2973,7 @@ type ApiK8sVersionsGetRequest struct { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sVersionsGetRequest) Filter(key string, value string) ApiK8sVersionsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2994,8 +2994,8 @@ func (r ApiK8sVersionsGetRequest) Execute() ([]string, *APIResponse, error) { } /* - * K8sVersionsGet List Kubernetes versions - * List available Kubernetes versions. + * K8sVersionsGet Get Kubernetes Versions + * Lists available K8s versions. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sVersionsGetRequest */ @@ -3096,7 +3096,7 @@ func (a *KubernetesApiService) K8sVersionsGetExecute(r ApiK8sVersionsGetRequest) return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_labels.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_labels.go index 37b09b8f4a47..e39480b31cc9 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_labels.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_labels.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -166,7 +166,7 @@ func (a *LabelsApiService) DatacentersLabelsDeleteExecute(r ApiDatacentersLabels return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -333,7 +333,7 @@ func (a *LabelsApiService) DatacentersLabelsFindByKeyExecute(r ApiDatacentersLab return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -397,7 +397,7 @@ func (r ApiDatacentersLabelsGetRequest) XContractNumber(xContractNumber int32) A // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLabelsGetRequest) Filter(key string, value string) ApiDatacentersLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -542,7 +542,7 @@ func (a *LabelsApiService) DatacentersLabelsGetExecute(r ApiDatacentersLabelsGet return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -610,8 +610,8 @@ func (r ApiDatacentersLabelsPostRequest) Execute() (LabelResource, *APIResponse, } /* - * DatacentersLabelsPost Create data center labels - * Add a new label to the specified data center. + * DatacentersLabelsPost Create a Data Center Label + * Adds a new label to the specified data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLabelsPostRequest @@ -725,7 +725,7 @@ func (a *LabelsApiService) DatacentersLabelsPostExecute(r ApiDatacentersLabelsPo return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -794,8 +794,8 @@ func (r ApiDatacentersLabelsPutRequest) Execute() (LabelResource, *APIResponse, } /* - * DatacentersLabelsPut Modify data center labels - * Modify the specified data center label. + * DatacentersLabelsPut Modify a Data Center Label by Key + * Modifies the specified data center label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param key The label key @@ -912,7 +912,7 @@ func (a *LabelsApiService) DatacentersLabelsPutExecute(r ApiDatacentersLabelsPut return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1091,7 +1091,7 @@ func (a *LabelsApiService) DatacentersServersLabelsDeleteExecute(r ApiDatacenter return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1262,7 +1262,7 @@ func (a *LabelsApiService) DatacentersServersLabelsFindByKeyExecute(r ApiDatacen return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1327,7 +1327,7 @@ func (r ApiDatacentersServersLabelsGetRequest) XContractNumber(xContractNumber i // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersLabelsGetRequest) Filter(key string, value string) ApiDatacentersServersLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1475,7 +1475,7 @@ func (a *LabelsApiService) DatacentersServersLabelsGetExecute(r ApiDatacentersSe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1544,8 +1544,8 @@ func (r ApiDatacentersServersLabelsPostRequest) Execute() (LabelResource, *APIRe } /* - * DatacentersServersLabelsPost Create server labels - * Add a new label to the specified server. + * DatacentersServersLabelsPost Create a Server Label + * Adds a new label to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -1662,7 +1662,7 @@ func (a *LabelsApiService) DatacentersServersLabelsPostExecute(r ApiDatacentersS return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1732,8 +1732,8 @@ func (r ApiDatacentersServersLabelsPutRequest) Execute() (LabelResource, *APIRes } /* - * DatacentersServersLabelsPut Modify server labels - * Modify the specified server label. + * DatacentersServersLabelsPut Modify a Server Label + * Modifies the specified server label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -1853,7 +1853,7 @@ func (a *LabelsApiService) DatacentersServersLabelsPutExecute(r ApiDatacentersSe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2032,7 +2032,7 @@ func (a *LabelsApiService) DatacentersVolumesLabelsDeleteExecute(r ApiDatacenter return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2203,7 +2203,7 @@ func (a *LabelsApiService) DatacentersVolumesLabelsFindByKeyExecute(r ApiDatacen return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2268,7 +2268,7 @@ func (r ApiDatacentersVolumesLabelsGetRequest) XContractNumber(xContractNumber i // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersVolumesLabelsGetRequest) Filter(key string, value string) ApiDatacentersVolumesLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2416,7 +2416,7 @@ func (a *LabelsApiService) DatacentersVolumesLabelsGetExecute(r ApiDatacentersVo return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2485,8 +2485,8 @@ func (r ApiDatacentersVolumesLabelsPostRequest) Execute() (LabelResource, *APIRe } /* - * DatacentersVolumesLabelsPost Create volume labels - * Add a new label to the specified volume. + * DatacentersVolumesLabelsPost Create a Volume Label + * Adds a new label to the specified volume. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. @@ -2603,7 +2603,7 @@ func (a *LabelsApiService) DatacentersVolumesLabelsPostExecute(r ApiDatacentersV return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2673,8 +2673,8 @@ func (r ApiDatacentersVolumesLabelsPutRequest) Execute() (LabelResource, *APIRes } /* - * DatacentersVolumesLabelsPut Modify volume labels - * Modify the specified volume label. + * DatacentersVolumesLabelsPut Modify a Volume Label + * Modifies the specified volume label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. @@ -2794,7 +2794,7 @@ func (a *LabelsApiService) DatacentersVolumesLabelsPutExecute(r ApiDatacentersVo return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2969,7 +2969,7 @@ func (a *LabelsApiService) IpblocksLabelsDeleteExecute(r ApiIpblocksLabelsDelete return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3136,7 +3136,7 @@ func (a *LabelsApiService) IpblocksLabelsFindByKeyExecute(r ApiIpblocksLabelsFin return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3200,7 +3200,7 @@ func (r ApiIpblocksLabelsGetRequest) XContractNumber(xContractNumber int32) ApiI // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiIpblocksLabelsGetRequest) Filter(key string, value string) ApiIpblocksLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -3345,7 +3345,7 @@ func (a *LabelsApiService) IpblocksLabelsGetExecute(r ApiIpblocksLabelsGetReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3528,7 +3528,7 @@ func (a *LabelsApiService) IpblocksLabelsPostExecute(r ApiIpblocksLabelsPostRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3597,8 +3597,8 @@ func (r ApiIpblocksLabelsPutRequest) Execute() (LabelResource, *APIResponse, err } /* - * IpblocksLabelsPut Modify IP block labels - * Modify the specified IP block label. + * IpblocksLabelsPut Modify a IP Block Label by ID + * Modifies the specified IP block label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @param key The label key @@ -3715,7 +3715,7 @@ func (a *LabelsApiService) IpblocksLabelsPutExecute(r ApiIpblocksLabelsPutReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3892,7 +3892,7 @@ func (a *LabelsApiService) LabelsFindByUrnExecute(r ApiLabelsFindByUrnRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3955,7 +3955,7 @@ func (r ApiLabelsGetRequest) XContractNumber(xContractNumber int32) ApiLabelsGet // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiLabelsGetRequest) Filter(key string, value string) ApiLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -4097,7 +4097,7 @@ func (a *LabelsApiService) LabelsGetExecute(r ApiLabelsGetRequest) (Labels, *API return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4272,7 +4272,7 @@ func (a *LabelsApiService) SnapshotsLabelsDeleteExecute(r ApiSnapshotsLabelsDele return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4439,7 +4439,7 @@ func (a *LabelsApiService) SnapshotsLabelsFindByKeyExecute(r ApiSnapshotsLabelsF return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4503,7 +4503,7 @@ func (r ApiSnapshotsLabelsGetRequest) XContractNumber(xContractNumber int32) Api // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiSnapshotsLabelsGetRequest) Filter(key string, value string) ApiSnapshotsLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -4648,7 +4648,7 @@ func (a *LabelsApiService) SnapshotsLabelsGetExecute(r ApiSnapshotsLabelsGetRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4716,8 +4716,8 @@ func (r ApiSnapshotsLabelsPostRequest) Execute() (LabelResource, *APIResponse, e } /* - * SnapshotsLabelsPost Create snapshot labels - * Add a new label to the specified snapshot. + * SnapshotsLabelsPost Create a Snapshot Label + * Adds a new label to the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsLabelsPostRequest @@ -4831,7 +4831,7 @@ func (a *LabelsApiService) SnapshotsLabelsPostExecute(r ApiSnapshotsLabelsPostRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4900,8 +4900,8 @@ func (r ApiSnapshotsLabelsPutRequest) Execute() (LabelResource, *APIResponse, er } /* - * SnapshotsLabelsPut Modify snapshot labels - * Modify the specified snapshot label. + * SnapshotsLabelsPut Modify a Snapshot Label by ID + * Modifies the specified snapshot label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @param key The label key @@ -5018,7 +5018,7 @@ func (a *LabelsApiService) SnapshotsLabelsPutExecute(r ApiSnapshotsLabelsPutRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_lans.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_lans.go index b443586c2db6..9eeb39d3211c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_lans.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_lans.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -166,7 +166,7 @@ func (a *LANsApiService) DatacentersLansDeleteExecute(r ApiDatacentersLansDelete return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -333,7 +333,7 @@ func (a *LANsApiService) DatacentersLansFindByIdExecute(r ApiDatacentersLansFind return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -407,7 +407,7 @@ func (r ApiDatacentersLansGetRequest) Limit(limit int32) ApiDatacentersLansGetRe // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLansGetRequest) Filter(key string, value string) ApiDatacentersLansGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -568,7 +568,7 @@ func (a *LANsApiService) DatacentersLansGetExecute(r ApiDatacentersLansGetReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -749,7 +749,7 @@ func (a *LANsApiService) DatacentersLansNicsFindByIdExecute(r ApiDatacentersLans return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -824,7 +824,7 @@ func (r ApiDatacentersLansNicsGetRequest) Limit(limit int32) ApiDatacentersLansN // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLansNicsGetRequest) Filter(key string, value string) ApiDatacentersLansNicsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -988,7 +988,7 @@ func (a *LANsApiService) DatacentersLansNicsGetExecute(r ApiDatacentersLansNicsG return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1175,7 +1175,7 @@ func (a *LANsApiService) DatacentersLansNicsPostExecute(r ApiDatacentersLansNics return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1362,7 +1362,7 @@ func (a *LANsApiService) DatacentersLansPatchExecute(r ApiDatacentersLansPatchRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1431,7 +1431,7 @@ func (r ApiDatacentersLansPostRequest) Execute() (LanPost, *APIResponse, error) /* * DatacentersLansPost Create LANs - * Create a LAN within the data center. + * Creates a LAN within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLansPostRequest @@ -1545,7 +1545,7 @@ func (a *LANsApiService) DatacentersLansPostExecute(r ApiDatacentersLansPostRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1732,7 +1732,7 @@ func (a *LANsApiService) DatacentersLansPutExecute(r ApiDatacentersLansPutReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_load_balancers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_load_balancers.go index 071b148f7903..bf9142fa8ebd 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_load_balancers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_load_balancers.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -170,7 +170,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsDeleteExec return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -341,7 +341,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsFindByNicI return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -406,7 +406,7 @@ func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) XContractNumber(xCont // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) Filter(key string, value string) ApiDatacentersLoadbalancersBalancednicsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -554,7 +554,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsGetExecute return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -624,7 +624,7 @@ func (r ApiDatacentersLoadbalancersBalancednicsPostRequest) Execute() (Nic, *API /* * DatacentersLoadbalancersBalancednicsPost Attach balanced NICs - * Attach an existing NIC to the specified Load Balancer. + * Attachs an existing NIC to the specified Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. @@ -741,7 +741,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsPostExecut return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -916,7 +916,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersDeleteExecute(r ApiDat return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1083,7 +1083,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersFindByIdExecute(r ApiD return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1157,7 +1157,7 @@ func (r ApiDatacentersLoadbalancersGetRequest) Limit(limit int32) ApiDatacenters // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLoadbalancersGetRequest) Filter(key string, value string) ApiDatacentersLoadbalancersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1318,7 +1318,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersGetExecute(r ApiDatace return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1505,7 +1505,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersPatchExecute(r ApiData return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1573,8 +1573,8 @@ func (r ApiDatacentersLoadbalancersPostRequest) Execute() (Loadbalancer, *APIRes } /* - * DatacentersLoadbalancersPost Create Load Balancers - * Create a Load Balancer within the data center. + * DatacentersLoadbalancersPost Create a Load Balancer + * Creates a Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLoadbalancersPostRequest @@ -1688,7 +1688,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersPostExecute(r ApiDatac return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1757,8 +1757,8 @@ func (r ApiDatacentersLoadbalancersPutRequest) Execute() (Loadbalancer, *APIResp } /* - * DatacentersLoadbalancersPut Modify Load Balancers - * Modify the properties of the specified Load Balancer within the data center. + * DatacentersLoadbalancersPut Modify a Load Balancer by ID + * Modifies the properties of the specified Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. @@ -1875,7 +1875,7 @@ func (a *LoadBalancersApiService) DatacentersLoadbalancersPutExecute(r ApiDatace return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_locations.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_locations.go index a1cf93c8a9a3..960bbede7001 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_locations.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_locations.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -54,8 +54,8 @@ func (r ApiLocationsFindByRegionIdRequest) Execute() (Locations, *APIResponse, e } /* - * LocationsFindByRegionId List locations within regions - * List locations by the region ID. + * LocationsFindByRegionId Get Locations within a Region + * Retrieves the available locations in a region specified by its ID. The 'regionId' consists of the two character identifier of the region (country), e.g., 'de'. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param regionId The unique ID of the region. * @return ApiLocationsFindByRegionIdRequest @@ -164,7 +164,7 @@ func (a *LocationsApiService) LocationsFindByRegionIdExecute(r ApiLocationsFindB return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -228,8 +228,8 @@ func (r ApiLocationsFindByRegionIdAndIdRequest) Execute() (Location, *APIRespons } /* - * LocationsFindByRegionIdAndId Retrieve specified locations - * Retrieve the properties of the specified location + * LocationsFindByRegionIdAndId Get Location by ID + * Retrieves the information about the location specified by its ID. The 'locationId' consists of the three-digit identifier of the city according to the IATA code. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param regionId The unique ID of the region. * @param locationId The unique ID of the location. @@ -341,7 +341,7 @@ func (a *LocationsApiService) LocationsFindByRegionIdAndIdExecute(r ApiLocations return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -404,7 +404,7 @@ func (r ApiLocationsGetRequest) XContractNumber(xContractNumber int32) ApiLocati // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiLocationsGetRequest) Filter(key string, value string) ApiLocationsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -425,11 +425,19 @@ func (r ApiLocationsGetRequest) Execute() (Locations, *APIResponse, error) { } /* - * LocationsGet List locations - * List the available locations for provisioning your virtual data centers. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return ApiLocationsGetRequest - */ +* LocationsGet Get Locations +* Retrieves the available physical locations where you can deploy cloud resources in a VDC. + +A location is identified by a combination of the following characters: + +* a two-character **regionId**, which represents a country (example: 'de') + +* a three-character **locationId**, which represents a city. The 'locationId' is typically based on the IATA code of the city's airport (example: 'txl'). + +>Note that 'locations' are read-only and cannot be changed. +* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +* @return ApiLocationsGetRequest +*/ func (a *LocationsApiService) LocationsGet(ctx _context.Context) ApiLocationsGetRequest { return ApiLocationsGetRequest{ ApiService: a, @@ -546,7 +554,7 @@ func (a *LocationsApiService) LocationsGetExecute(r ApiLocationsGetRequest) (Loc return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_nat_gateways.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_nat_gateways.go index c8cb189f71f2..26550200765e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_nat_gateways.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_nat_gateways.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -166,7 +166,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysDeleteExecute(r ApiDatacen return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -333,7 +333,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFindByNatGatewayIdExecute( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -504,7 +504,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsDeleteExecute(r Ap return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -667,7 +667,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsFindByFlowLogIdExe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -737,7 +737,7 @@ func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Limit(limit int32) ApiDatac // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersNatgatewaysFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -898,7 +898,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsGetExecute(r ApiDa return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1081,7 +1081,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPatchExecute(r Api return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1145,8 +1145,8 @@ func (r ApiDatacentersNatgatewaysFlowlogsPostRequest) Execute() (FlowLog, *APIRe } /* - * DatacentersNatgatewaysFlowlogsPost Create NAT Gateway Flow Logs - * Add a new Flow Log for the specified NAT Gateway. + * DatacentersNatgatewaysFlowlogsPost Create a NAT Gateway Flow Log + * Adds a new Flow Log to the specified NAT Gateway. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. @@ -1260,7 +1260,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPostExecute(r ApiD return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1443,7 +1443,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPutExecute(r ApiDa return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1507,7 +1507,7 @@ func (r ApiDatacentersNatgatewaysGetRequest) XContractNumber(xContractNumber int // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNatgatewaysGetRequest) Filter(key string, value string) ApiDatacentersNatgatewaysGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1652,7 +1652,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysGetExecute(r ApiDatacenter return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1839,7 +1839,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysPatchExecute(r ApiDatacent return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1907,8 +1907,8 @@ func (r ApiDatacentersNatgatewaysPostRequest) Execute() (NatGateway, *APIRespons } /* - - DatacentersNatgatewaysPost Create NAT Gateways - - Create a NAT Gateway within the data center. + - DatacentersNatgatewaysPost Create a NAT Gateway + - Creates a NAT Gateway within the data center. This operation is restricted to contract owner, admin, and users with 'createInternetAccess' privileges. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -2024,7 +2024,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysPostExecute(r ApiDatacente return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2211,7 +2211,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysPutExecute(r ApiDatacenter return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2390,7 +2390,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesDeleteExecute(r ApiDa return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2561,7 +2561,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesFindByNatGatewayRuleI return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2626,7 +2626,7 @@ func (r ApiDatacentersNatgatewaysRulesGetRequest) XContractNumber(xContractNumbe // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNatgatewaysRulesGetRequest) Filter(key string, value string) ApiDatacentersNatgatewaysRulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2774,7 +2774,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesGetExecute(r ApiDatac return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2844,8 +2844,8 @@ func (r ApiDatacentersNatgatewaysRulesPatchRequest) Execute() (NatGatewayRule, * } /* - * DatacentersNatgatewaysRulesPatch Partially modify NAT Gateway rules - * Update the properties of the specified NAT Gateway rule. + * DatacentersNatgatewaysRulesPatch Partially Modify a NAT Gateway Rule by ID + * Updates the properties of the specified NAT Gateway rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. @@ -2965,7 +2965,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPatchExecute(r ApiDat return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3034,8 +3034,8 @@ func (r ApiDatacentersNatgatewaysRulesPostRequest) Execute() (NatGatewayRule, *A } /* - * DatacentersNatgatewaysRulesPost Create NAT Gateway rules - * Create a rule for the specified NAT Gateway. + * DatacentersNatgatewaysRulesPost Create a NAT Gateway Rule + * Creates a rule for the specified NAT Gateway. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. @@ -3152,7 +3152,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPostExecute(r ApiData return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3222,7 +3222,7 @@ func (r ApiDatacentersNatgatewaysRulesPutRequest) Execute() (NatGatewayRule, *AP } /* - * DatacentersNatgatewaysRulesPut Modify NAT Gateway rules + * DatacentersNatgatewaysRulesPut Modify a NAT Gateway Rule by ID * Modify the specified NAT Gateway rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. @@ -3343,7 +3343,7 @@ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPutExecute(r ApiDatac return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_interfaces.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_interfaces.go index df5b0937db06..8ba4b06c3462 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_interfaces.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_interfaces.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -170,7 +170,7 @@ func (a *NetworkInterfacesApiService) DatacentersServersNicsDeleteExecute(r ApiD return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -341,7 +341,7 @@ func (a *NetworkInterfacesApiService) DatacentersServersNicsFindByIdExecute(r Ap return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -416,7 +416,7 @@ func (r ApiDatacentersServersNicsGetRequest) Limit(limit int32) ApiDatacentersSe // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersNicsGetRequest) Filter(key string, value string) ApiDatacentersServersNicsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -580,7 +580,7 @@ func (a *NetworkInterfacesApiService) DatacentersServersNicsGetExecute(r ApiData return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -771,7 +771,7 @@ func (a *NetworkInterfacesApiService) DatacentersServersNicsPatchExecute(r ApiDa return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -840,8 +840,8 @@ func (r ApiDatacentersServersNicsPostRequest) Execute() (Nic, *APIResponse, erro } /* - * DatacentersServersNicsPost Create NICs - * Add a NIC to the specified server. The combined total of NICs and attached volumes cannot exceed 24 per server. + * DatacentersServersNicsPost Create a NIC + * Adds a NIC to the specified server. The combined total of NICs and attached volumes cannot exceed 24 per server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -958,7 +958,7 @@ func (a *NetworkInterfacesApiService) DatacentersServersNicsPostExecute(r ApiDat return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1149,7 +1149,7 @@ func (a *NetworkInterfacesApiService) DatacentersServersNicsPutExecute(r ApiData return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_load_balancers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_load_balancers.go index f601f147d48e..6e5b317d1000 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_load_balancers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_network_load_balancers.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -166,7 +166,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersDeleteEx return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -333,7 +333,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFindByNe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -512,7 +512,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogs return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -683,7 +683,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogs return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -748,7 +748,7 @@ func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) XContractNumber(xC // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -896,7 +896,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogs return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1087,7 +1087,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogs return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1156,8 +1156,8 @@ func (r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) Execute() (FlowLo } /* - * DatacentersNetworkloadbalancersFlowlogsPost Create NLB Flow Logs - * Add a new Flow Log for the Network Load Balancer. + * DatacentersNetworkloadbalancersFlowlogsPost Create a NLB Flow Log + * Adds a new Flow Log for the Network Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. @@ -1274,7 +1274,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogs return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1465,7 +1465,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogs return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1644,7 +1644,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardi return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1815,7 +1815,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardi return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1880,7 +1880,7 @@ func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) XContractNu // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) Filter(key string, value string) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2028,7 +2028,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardi return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2219,7 +2219,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardi return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2288,8 +2288,8 @@ func (r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) Execute() } /* - * DatacentersNetworkloadbalancersForwardingrulesPost Create NLB forwarding rules - * Create a forwarding rule for the specified Network Load Balancer. + * DatacentersNetworkloadbalancersForwardingrulesPost Create a NLB Forwarding Rule + * Creates a forwarding rule for the specified Network Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. @@ -2406,7 +2406,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardi return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2597,7 +2597,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardi return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2671,7 +2671,7 @@ func (r ApiDatacentersNetworkloadbalancersGetRequest) Limit(limit int32) ApiData // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNetworkloadbalancersGetRequest) Filter(key string, value string) ApiDatacentersNetworkloadbalancersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2832,7 +2832,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersGetExecu return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3019,7 +3019,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPatchExe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3087,8 +3087,8 @@ func (r ApiDatacentersNetworkloadbalancersPostRequest) Execute() (NetworkLoadBal } /* - * DatacentersNetworkloadbalancersPost Create Network Load Balancers - * Create a Network Load Balancer within the data center. + * DatacentersNetworkloadbalancersPost Create a Network Load Balancer + * Creates a Network Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersNetworkloadbalancersPostRequest @@ -3202,7 +3202,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPostExec return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3389,7 +3389,7 @@ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPutExecu return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_private_cross_connects.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_private_cross_connects.go index c65d59fb2b4e..8f02a0971882 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_private_cross_connects.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_private_cross_connects.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -162,7 +162,7 @@ func (a *PrivateCrossConnectsApiService) PccsDeleteExecute(r ApiPccsDeleteReques return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -325,7 +325,7 @@ func (a *PrivateCrossConnectsApiService) PccsFindByIdExecute(r ApiPccsFindByIdRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -388,7 +388,7 @@ func (r ApiPccsGetRequest) XContractNumber(xContractNumber int32) ApiPccsGetRequ // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiPccsGetRequest) Filter(key string, value string) ApiPccsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -530,7 +530,7 @@ func (a *PrivateCrossConnectsApiService) PccsGetExecute(r ApiPccsGetRequest) (Pr return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -713,7 +713,7 @@ func (a *PrivateCrossConnectsApiService) PccsPatchExecute(r ApiPccsPatchRequest) return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -780,8 +780,8 @@ func (r ApiPccsPostRequest) Execute() (PrivateCrossConnect, *APIResponse, error) } /* - * PccsPost Create private Cross-Connects - * Create a private Cross-Connect. + * PccsPost Create a Private Cross-Connect + * Creates a private Cross-Connect. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiPccsPostRequest */ @@ -892,7 +892,7 @@ func (a *PrivateCrossConnectsApiService) PccsPostExecute(r ApiPccsPostRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_requests.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_requests.go index 0ae0db6a1224..42de45c2156c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_requests.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_requests.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -164,7 +164,7 @@ func (a *RequestsApiService) RequestsFindByIdExecute(r ApiRequestsFindByIdReques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -292,7 +292,7 @@ func (r ApiRequestsGetRequest) Limit(limit int32) ApiRequestsGetRequest { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiRequestsGetRequest) Filter(key string, value string) ApiRequestsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -483,7 +483,7 @@ func (a *RequestsApiService) RequestsGetExecute(r ApiRequestsGetRequest) (Reques return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -547,7 +547,7 @@ func (r ApiRequestsStatusGetRequest) XContractNumber(xContractNumber int32) ApiR // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiRequestsStatusGetRequest) Filter(key string, value string) ApiRequestsStatusGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -692,7 +692,7 @@ func (a *RequestsApiService) RequestsStatusGetExecute(r ApiRequestsStatusGetRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_servers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_servers.go index e1c30e834bf5..e3716f10a842 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_servers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_servers.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -56,14 +56,18 @@ func (r ApiDatacentersServersCdromsDeleteRequest) Execute() (*APIResponse, error } /* - * DatacentersServersCdromsDelete Detach CD-ROMs - * Detach the specified CD-ROM from the server. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param datacenterId The unique ID of the data center. - * @param serverId The unique ID of the server. - * @param cdromId The unique ID of the CD-ROM. - * @return ApiDatacentersServersCdromsDeleteRequest - */ + - DatacentersServersCdromsDelete Detach a CD-ROM by ID + - Detachs the specified CD-ROM from the server. + +Detaching a CD-ROM deletes the CD-ROM. The image will not be deleted. + +Note that detaching a CD-ROM leads to a reset of the server. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param datacenterId The unique ID of the data center. + - @param serverId The unique ID of the server. + - @param cdromId The unique ID of the CD-ROM. + - @return ApiDatacentersServersCdromsDeleteRequest +*/ func (a *ServersApiService) DatacentersServersCdromsDelete(ctx _context.Context, datacenterId string, serverId string, cdromId string) ApiDatacentersServersCdromsDeleteRequest { return ApiDatacentersServersCdromsDeleteRequest{ ApiService: a, @@ -170,7 +174,7 @@ func (a *ServersApiService) DatacentersServersCdromsDeleteExecute(r ApiDatacente return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -225,8 +229,8 @@ func (r ApiDatacentersServersCdromsFindByIdRequest) Execute() (Image, *APIRespon } /* - * DatacentersServersCdromsFindById Retrieve attached CD-ROMs - * Retrieve the properties of the CD-ROM, attached to the specified server. + * DatacentersServersCdromsFindById Get Attached CD-ROM by ID + * Retrieves the properties of the CD-ROM attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -341,7 +345,7 @@ func (a *ServersApiService) DatacentersServersCdromsFindByIdExecute(r ApiDatacen return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -416,7 +420,7 @@ func (r ApiDatacentersServersCdromsGetRequest) Limit(limit int32) ApiDatacenters // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersCdromsGetRequest) Filter(key string, value string) ApiDatacentersServersCdromsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -437,8 +441,8 @@ func (r ApiDatacentersServersCdromsGetRequest) Execute() (Cdroms, *APIResponse, } /* - * DatacentersServersCdromsGet List attached CD-ROMs - * List all CD-ROMs, attached to the specified server. + * DatacentersServersCdromsGet Get Attached CD-ROMs + * Lists all CD-ROMs attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -580,7 +584,7 @@ func (a *ServersApiService) DatacentersServersCdromsGetExecute(r ApiDatacentersS return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -649,13 +653,17 @@ func (r ApiDatacentersServersCdromsPostRequest) Execute() (Image, *APIResponse, } /* - * DatacentersServersCdromsPost Attach CD-ROMs - * Attach a CD-ROM to an existing server. Up to two CD-ROMs can be attached to the same server. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param datacenterId The unique ID of the data center. - * @param serverId The unique ID of the server. - * @return ApiDatacentersServersCdromsPostRequest - */ + - DatacentersServersCdromsPost Attach a CD-ROM + - Attachs a CD-ROM to an existing server specified by its ID. + +CD-ROMs cannot be created stand-alone like volumes. They are either attached to a server or do not exist. They always have an ISO-Image associated; empty CD-ROMs can not be provisioned. It is possible to attach up to two CD-ROMs to the same server. + +Note that attaching a CD-ROM leads to a reset of the server. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param datacenterId The unique ID of the data center. + - @param serverId The unique ID of the server. + - @return ApiDatacentersServersCdromsPostRequest +*/ func (a *ServersApiService) DatacentersServersCdromsPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersCdromsPostRequest { return ApiDatacentersServersCdromsPostRequest{ ApiService: a, @@ -767,7 +775,7 @@ func (a *ServersApiService) DatacentersServersCdromsPostExecute(r ApiDatacenters return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -811,6 +819,7 @@ type ApiDatacentersServersDeleteRequest struct { pretty *bool depth *int32 xContractNumber *int32 + deleteVolumes *bool } func (r ApiDatacentersServersDeleteRequest) Pretty(pretty bool) ApiDatacentersServersDeleteRequest { @@ -825,6 +834,10 @@ func (r ApiDatacentersServersDeleteRequest) XContractNumber(xContractNumber int3 r.xContractNumber = &xContractNumber return r } +func (r ApiDatacentersServersDeleteRequest) DeleteVolumes(deleteVolumes bool) ApiDatacentersServersDeleteRequest { + r.deleteVolumes = &deleteVolumes + return r +} func (r ApiDatacentersServersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersDeleteExecute(r) @@ -832,7 +845,7 @@ func (r ApiDatacentersServersDeleteRequest) Execute() (*APIResponse, error) { /* * DatacentersServersDelete Delete servers - * Delete the specified server in your data center. The attached storage volumes will not be removed — a separate API call must be made for these actions. + * Delete the specified server in your data center. The attached storage volumes will also be removed if the query parameter is set to true otherwise a separate API call must be made for these actions. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -888,6 +901,9 @@ func (a *ServersApiService) DatacentersServersDeleteExecute(r ApiDatacentersServ localVarQueryParams.Add("depth", parameterToString(0, "")) } } + if r.deleteVolumes != nil { + localVarQueryParams.Add("deleteVolumes", parameterToString(*r.deleteVolumes, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -942,7 +958,7 @@ func (a *ServersApiService) DatacentersServersDeleteExecute(r ApiDatacentersServ return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1109,7 +1125,7 @@ func (a *ServersApiService) DatacentersServersFindByIdExecute(r ApiDatacentersSe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1188,7 +1204,7 @@ func (r ApiDatacentersServersGetRequest) Limit(limit int32) ApiDatacentersServer // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersGetRequest) Filter(key string, value string) ApiDatacentersServersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1352,7 +1368,7 @@ func (a *ServersApiService) DatacentersServersGetExecute(r ApiDatacentersServers return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1539,7 +1555,7 @@ func (a *ServersApiService) DatacentersServersPatchExecute(r ApiDatacentersServe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1607,8 +1623,8 @@ func (r ApiDatacentersServersPostRequest) Execute() (Server, *APIResponse, error } /* - * DatacentersServersPost Create servers - * Create a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time. + * DatacentersServersPost Create a Server + * Creates a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersServersPostRequest @@ -1722,7 +1738,7 @@ func (a *ServersApiService) DatacentersServersPostExecute(r ApiDatacentersServer return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1791,8 +1807,8 @@ func (r ApiDatacentersServersPutRequest) Execute() (Server, *APIResponse, error) } /* - - DatacentersServersPut Modify servers - - Modify the properties of the specified server within the data center. + - DatacentersServersPut Modify a Server by ID + - Modifies the properties of the specified server within the data center. Starting with v5, the 'allowReboot' attribute is retired; while previously required for changing certain server properties, this behavior is now implicit, and the backend will perform this automatically. For example, in earlier versions, when the CPU family is changed, 'allowReboot' had to be set to 'true'; this is no longer required, the reboot will be performed automatically. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -1911,7 +1927,7 @@ func (a *ServersApiService) DatacentersServersPutExecute(r ApiDatacentersServers return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2086,7 +2102,7 @@ func (a *ServersApiService) DatacentersServersRebootPostExecute(r ApiDatacenters return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2141,7 +2157,7 @@ func (r ApiDatacentersServersRemoteConsoleGetRequest) XContractNumber(xContractN // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersRemoteConsoleGetRequest) Filter(key string, value string) ApiDatacentersServersRemoteConsoleGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2289,7 +2305,7 @@ func (a *ServersApiService) DatacentersServersRemoteConsoleGetExecute(r ApiDatac return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2353,10 +2369,12 @@ func (r ApiDatacentersServersResumePostRequest) Execute() (*APIResponse, error) } /* - - DatacentersServersResumePost Resume Cubes instances - - Resume a suspended Cube instance; no billing event will be generated. + - DatacentersServersResumePost Resume a Cube Server by ID + - Resumes a suspended Cube Server specified by its ID. -This operation is only supported for the Cubes. +Since the suspended instance was not deleted the allocated resources continue to be billed. You can perform this operation only for Cube Servers. + +To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. @@ -2466,7 +2484,7 @@ func (a *ServersApiService) DatacentersServersResumePostExecute(r ApiDatacenters return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2520,13 +2538,21 @@ func (r ApiDatacentersServersStartPostRequest) Execute() (*APIResponse, error) { } /* - * DatacentersServersStartPost Start servers - * Start the specified server within the data center; if the server's public IP address has been deallocated, a new IP address will be assigned. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param datacenterId The unique ID of the data center. - * @param serverId The unique ID of the server. - * @return ApiDatacentersServersStartPostRequest - */ + - DatacentersServersStartPost Start an Enterprise Server by ID + - Starts the Enterprise Server specified by its ID. + +>Note that you cannot use this method to start a Cube Server. + +By starting the Enterprise Server, cores and RAM are provisioned, and the billing continues. + +If the server's public IPv4 address has been deallocated, a new IPv4 address will be assigned. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. + +To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param datacenterId The unique ID of the data center. + - @param serverId The unique ID of the server. + - @return ApiDatacentersServersStartPostRequest +*/ func (a *ServersApiService) DatacentersServersStartPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersStartPostRequest { return ApiDatacentersServersStartPostRequest{ ApiService: a, @@ -2631,7 +2657,7 @@ func (a *ServersApiService) DatacentersServersStartPostExecute(r ApiDatacentersS return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2685,10 +2711,16 @@ func (r ApiDatacentersServersStopPostRequest) Execute() (*APIResponse, error) { } /* - - DatacentersServersStopPost Stop VMs - - Stop the specified server within the data center: the VM will be forcefully shut down, the billing will cease, and any allocated public IPs will be deallocated. + - DatacentersServersStopPost Stop an Enterprise Server by ID + - Stops the Enterprise Server specified by its ID. + +>Note that you cannot use this method to stop a Cube Server. + + By stopping the Enterprise Server, cores and RAM are freed and no longer charged. -This operation is not supported for the Cubes. +Public IPv4 IPs that are not reserved are returned to the IPv4 pool. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. + +To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. @@ -2798,7 +2830,7 @@ func (a *ServersApiService) DatacentersServersStopPostExecute(r ApiDatacentersSe return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2852,10 +2884,12 @@ func (r ApiDatacentersServersSuspendPostRequest) Execute() (*APIResponse, error) } /* - - DatacentersServersSuspendPost Suspend Cubes instances - - Suspend the specified Cubes instance within the data center. The instance will not be deleted, and allocated resources will continue to be billed. + - DatacentersServersSuspendPost Suspend a Cube Server by ID + - Suspends the specified Cubes instance within the data center. + +The instance is not deleted and allocated resources continue to be billed. You can perform this operation only for Cube Servers. -This operation is only supported for the Cubes. +To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. @@ -2965,7 +2999,7 @@ func (a *ServersApiService) DatacentersServersSuspendPostExecute(r ApiDatacenter return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3020,7 +3054,7 @@ func (r ApiDatacentersServersTokenGetRequest) XContractNumber(xContractNumber in // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersTokenGetRequest) Filter(key string, value string) ApiDatacentersServersTokenGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -3168,7 +3202,7 @@ func (a *ServersApiService) DatacentersServersTokenGetExecute(r ApiDatacentersSe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3232,15 +3266,13 @@ func (r ApiDatacentersServersUpgradePostRequest) Execute() (*APIResponse, error) } /* - - DatacentersServersUpgradePost Upgrade servers - - Upgrade the server version, if needed. To determine if an upgrade is available, execute the following call: - -'/datacenters/{datacenterId}/servers?upgradeNeeded=true' - - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param datacenterId The unique ID of the data center. - - @param serverId The unique ID of the server. - - @return ApiDatacentersServersUpgradePostRequest -*/ + * DatacentersServersUpgradePost Upgrade a Server by ID + * Upgrades the server version. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param datacenterId The unique ID of the data center. + * @param serverId The unique ID of the server. + * @return ApiDatacentersServersUpgradePostRequest + */ func (a *ServersApiService) DatacentersServersUpgradePost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersUpgradePostRequest { return ApiDatacentersServersUpgradePostRequest{ ApiService: a, @@ -3345,7 +3377,7 @@ func (a *ServersApiService) DatacentersServersUpgradePostExecute(r ApiDatacenter return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3400,14 +3432,16 @@ func (r ApiDatacentersServersVolumesDeleteRequest) Execute() (*APIResponse, erro } /* - * DatacentersServersVolumesDelete Detach volumes - * Detach the specified volume from the server without deleting it from the data center. A separate request must be made to perform the deletion. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param datacenterId The unique ID of the data center. - * @param serverId The unique ID of the server. - * @param volumeId The unique ID of the volume. - * @return ApiDatacentersServersVolumesDeleteRequest - */ + - DatacentersServersVolumesDelete Detach a Volume by ID + - Detachs the specified volume from the server. + +Note that only the volume's connection to the specified server is disconnected. If you want to delete the volume, you must submit a separate request to perform the deletion. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param datacenterId The unique ID of the data center. + - @param serverId The unique ID of the server. + - @param volumeId The unique ID of the volume. + - @return ApiDatacentersServersVolumesDeleteRequest +*/ func (a *ServersApiService) DatacentersServersVolumesDelete(ctx _context.Context, datacenterId string, serverId string, volumeId string) ApiDatacentersServersVolumesDeleteRequest { return ApiDatacentersServersVolumesDeleteRequest{ ApiService: a, @@ -3514,7 +3548,7 @@ func (a *ServersApiService) DatacentersServersVolumesDeleteExecute(r ApiDatacent return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3569,8 +3603,8 @@ func (r ApiDatacentersServersVolumesFindByIdRequest) Execute() (Volume, *APIResp } /* - * DatacentersServersVolumesFindById Retrieve attached volumes - * Retrieve the properties of the volume, attached to the specified server. + * DatacentersServersVolumesFindById Get Attached Volume by ID + * Retrieves the properties of the volume attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -3685,7 +3719,7 @@ func (a *ServersApiService) DatacentersServersVolumesFindByIdExecute(r ApiDatace return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3760,7 +3794,7 @@ func (r ApiDatacentersServersVolumesGetRequest) Limit(limit int32) ApiDatacenter // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersVolumesGetRequest) Filter(key string, value string) ApiDatacentersServersVolumesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -3781,8 +3815,8 @@ func (r ApiDatacentersServersVolumesGetRequest) Execute() (AttachedVolumes, *API } /* - * DatacentersServersVolumesGet List attached volumes - * List all volumes, attached to the specified server. + * DatacentersServersVolumesGet Get Attached Volumes + * Lists all volumes attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. @@ -3924,7 +3958,7 @@ func (a *ServersApiService) DatacentersServersVolumesGetExecute(r ApiDatacenters return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3993,12 +4027,14 @@ func (r ApiDatacentersServersVolumesPostRequest) Execute() (Volume, *APIResponse } /* - - DatacentersServersVolumesPost Attach volumes - - Attach an existing storage volume to the specified server. + - DatacentersServersVolumesPost Attach a Volume to a Server + - Attachs an existing storage volume to the specified server. + +You can attach an existing volume in the VDC to a server. To move a volume from one server to another, you must first detach the volume from the first server and attach it to the second server. -A volume scan also be created and attached in one step by providing the new volume description as payload. +It is also possible to create and attach a volume in one step by simply providing a new volume description as a payload. The only difference is the URL; see 'Creating a Volume' for details about volumes. -The combined total of attached volumes and NICs cannot exceed 24 per server. +Note that the combined total of attached volumes and NICs cannot exceed 24 per server. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. @@ -4115,7 +4151,7 @@ func (a *ServersApiService) DatacentersServersVolumesPostExecute(r ApiDatacenter return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_snapshots.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_snapshots.go index 57bf0744ecee..1595da3a347f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_snapshots.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_snapshots.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -162,7 +162,7 @@ func (a *SnapshotsApiService) SnapshotsDeleteExecute(r ApiSnapshotsDeleteRequest return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -325,7 +325,7 @@ func (a *SnapshotsApiService) SnapshotsFindByIdExecute(r ApiSnapshotsFindByIdReq return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -388,7 +388,7 @@ func (r ApiSnapshotsGetRequest) XContractNumber(xContractNumber int32) ApiSnapsh // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiSnapshotsGetRequest) Filter(key string, value string) ApiSnapshotsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -530,7 +530,7 @@ func (a *SnapshotsApiService) SnapshotsGetExecute(r ApiSnapshotsGetRequest) (Sna return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -713,7 +713,7 @@ func (a *SnapshotsApiService) SnapshotsPatchExecute(r ApiSnapshotsPatchRequest) return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -781,8 +781,8 @@ func (r ApiSnapshotsPutRequest) Execute() (Snapshot, *APIResponse, error) { } /* - * SnapshotsPut Modify snapshots - * Modify the properties of the specified snapshot. + * SnapshotsPut Modify a Snapshot by ID + * Modifies the properties of the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsPutRequest @@ -896,7 +896,7 @@ func (a *SnapshotsApiService) SnapshotsPutExecute(r ApiSnapshotsPutRequest) (Sna return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_target_groups.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_target_groups.go new file mode 100644 index 000000000000..6b5bd8feb69a --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_target_groups.go @@ -0,0 +1,1140 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + _context "context" + "fmt" + "io" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// TargetGroupsApiService TargetGroupsApi service +type TargetGroupsApiService service + +type ApiTargetGroupsDeleteRequest struct { + ctx _context.Context + ApiService *TargetGroupsApiService + targetGroupId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiTargetGroupsDeleteRequest) Pretty(pretty bool) ApiTargetGroupsDeleteRequest { + r.pretty = &pretty + return r +} +func (r ApiTargetGroupsDeleteRequest) Depth(depth int32) ApiTargetGroupsDeleteRequest { + r.depth = &depth + return r +} +func (r ApiTargetGroupsDeleteRequest) XContractNumber(xContractNumber int32) ApiTargetGroupsDeleteRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiTargetGroupsDeleteRequest) Execute() (*APIResponse, error) { + return r.ApiService.TargetGroupsDeleteExecute(r) +} + +/* + * TargetGroupsDelete Delete a Target Group by ID + * Deletes the target group specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param targetGroupId The unique ID of the target group. + * @return ApiTargetGroupsDeleteRequest + */ +func (a *TargetGroupsApiService) TargetGroupsDelete(ctx _context.Context, targetGroupId string) ApiTargetGroupsDeleteRequest { + return ApiTargetGroupsDeleteRequest{ + ApiService: a, + ctx: ctx, + targetGroupId: targetGroupId, + } +} + +/* + * Execute executes the request + */ +func (a *TargetGroupsApiService) TargetGroupsDeleteExecute(r ApiTargetGroupsDeleteRequest) (*APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetGroupsDelete") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/targetgroups/{targetGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "TargetGroupsDelete", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarAPIResponse, newErr + } + newErr.model = v + return localVarAPIResponse, newErr + } + + return localVarAPIResponse, nil +} + +type ApiTargetgroupsFindByTargetGroupIdRequest struct { + ctx _context.Context + ApiService *TargetGroupsApiService + targetGroupId string + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiTargetgroupsFindByTargetGroupIdRequest) Pretty(pretty bool) ApiTargetgroupsFindByTargetGroupIdRequest { + r.pretty = &pretty + return r +} +func (r ApiTargetgroupsFindByTargetGroupIdRequest) Depth(depth int32) ApiTargetgroupsFindByTargetGroupIdRequest { + r.depth = &depth + return r +} +func (r ApiTargetgroupsFindByTargetGroupIdRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsFindByTargetGroupIdRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiTargetgroupsFindByTargetGroupIdRequest) Execute() (TargetGroup, *APIResponse, error) { + return r.ApiService.TargetgroupsFindByTargetGroupIdExecute(r) +} + +/* + * TargetgroupsFindByTargetGroupId Get a Target Group by ID + * Retrieves the properties of the target group specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param targetGroupId The unique ID of the target group. + * @return ApiTargetgroupsFindByTargetGroupIdRequest + */ +func (a *TargetGroupsApiService) TargetgroupsFindByTargetGroupId(ctx _context.Context, targetGroupId string) ApiTargetgroupsFindByTargetGroupIdRequest { + return ApiTargetgroupsFindByTargetGroupIdRequest{ + ApiService: a, + ctx: ctx, + targetGroupId: targetGroupId, + } +} + +/* + * Execute executes the request + * @return TargetGroup + */ +func (a *TargetGroupsApiService) TargetgroupsFindByTargetGroupIdExecute(r ApiTargetgroupsFindByTargetGroupIdRequest) (TargetGroup, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TargetGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsFindByTargetGroupId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/targetgroups/{targetGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "TargetgroupsFindByTargetGroupId", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiTargetgroupsGetRequest struct { + ctx _context.Context + ApiService *TargetGroupsApiService + filters _neturl.Values + orderBy *string + maxResults *int32 + pretty *bool + depth *int32 + xContractNumber *int32 + offset *int32 + limit *int32 +} + +func (r ApiTargetgroupsGetRequest) Pretty(pretty bool) ApiTargetgroupsGetRequest { + r.pretty = &pretty + return r +} +func (r ApiTargetgroupsGetRequest) Depth(depth int32) ApiTargetgroupsGetRequest { + r.depth = &depth + return r +} +func (r ApiTargetgroupsGetRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsGetRequest { + r.xContractNumber = &xContractNumber + return r +} +func (r ApiTargetgroupsGetRequest) Offset(offset int32) ApiTargetgroupsGetRequest { + r.offset = &offset + return r +} +func (r ApiTargetgroupsGetRequest) Limit(limit int32) ApiTargetgroupsGetRequest { + r.limit = &limit + return r +} + +// Filters query parameters limit results to those containing a matching value for a specific property. +func (r ApiTargetgroupsGetRequest) Filter(key string, value string) ApiTargetgroupsGetRequest { + filterKey := fmt.Sprintf(FilterQueryParam, key) + r.filters[filterKey] = append(r.filters[filterKey], value) + return r +} + +// OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. +func (r ApiTargetgroupsGetRequest) OrderBy(orderBy string) ApiTargetgroupsGetRequest { + r.orderBy = &orderBy + return r +} + +// MaxResults query param limits the number of results returned. +func (r ApiTargetgroupsGetRequest) MaxResults(maxResults int32) ApiTargetgroupsGetRequest { + r.maxResults = &maxResults + return r +} + +func (r ApiTargetgroupsGetRequest) Execute() (TargetGroups, *APIResponse, error) { + return r.ApiService.TargetgroupsGetExecute(r) +} + +/* + - TargetgroupsGet Get Target Groups + - Lists target groups. + +A target group is a set of one or more registered targets. You must specify an IP address, a port number, and a weight for each target. Any object with an IP address in your VDC can be a target, for example, a VM, another load balancer, etc. You can register a target with multiple target groups. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @return ApiTargetgroupsGetRequest +*/ +func (a *TargetGroupsApiService) TargetgroupsGet(ctx _context.Context) ApiTargetgroupsGetRequest { + return ApiTargetgroupsGetRequest{ + ApiService: a, + ctx: ctx, + filters: _neturl.Values{}, + } +} + +/* + * Execute executes the request + * @return TargetGroups + */ +func (a *TargetGroupsApiService) TargetgroupsGetExecute(r ApiTargetgroupsGetRequest) (TargetGroups, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TargetGroups + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsGet") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/targetgroups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") + if defaultQueryParam == "" { + localVarQueryParams.Add("offset", parameterToString(0, "")) + } + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") + if defaultQueryParam == "" { + localVarQueryParams.Add("limit", parameterToString(100, "")) + } + } + if r.orderBy != nil { + localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) + } + if r.maxResults != nil { + localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) + } + if len(r.filters) > 0 { + for k, v := range r.filters { + for _, iv := range v { + localVarQueryParams.Add(k, iv) + } + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "TargetgroupsGet", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiTargetgroupsPatchRequest struct { + ctx _context.Context + ApiService *TargetGroupsApiService + targetGroupId string + targetGroupProperties *TargetGroupProperties + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiTargetgroupsPatchRequest) TargetGroupProperties(targetGroupProperties TargetGroupProperties) ApiTargetgroupsPatchRequest { + r.targetGroupProperties = &targetGroupProperties + return r +} +func (r ApiTargetgroupsPatchRequest) Pretty(pretty bool) ApiTargetgroupsPatchRequest { + r.pretty = &pretty + return r +} +func (r ApiTargetgroupsPatchRequest) Depth(depth int32) ApiTargetgroupsPatchRequest { + r.depth = &depth + return r +} +func (r ApiTargetgroupsPatchRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsPatchRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiTargetgroupsPatchRequest) Execute() (TargetGroup, *APIResponse, error) { + return r.ApiService.TargetgroupsPatchExecute(r) +} + +/* + * TargetgroupsPatch Partially Modify a Target Group by ID + * Updates the properties of the target group specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param targetGroupId The unique ID of the target group. + * @return ApiTargetgroupsPatchRequest + */ +func (a *TargetGroupsApiService) TargetgroupsPatch(ctx _context.Context, targetGroupId string) ApiTargetgroupsPatchRequest { + return ApiTargetgroupsPatchRequest{ + ApiService: a, + ctx: ctx, + targetGroupId: targetGroupId, + } +} + +/* + * Execute executes the request + * @return TargetGroup + */ +func (a *TargetGroupsApiService) TargetgroupsPatchExecute(r ApiTargetgroupsPatchRequest) (TargetGroup, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TargetGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsPatch") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/targetgroups/{targetGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.targetGroupProperties == nil { + return localVarReturnValue, nil, reportError("targetGroupProperties is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.targetGroupProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "TargetgroupsPatch", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiTargetgroupsPostRequest struct { + ctx _context.Context + ApiService *TargetGroupsApiService + targetGroup *TargetGroup + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiTargetgroupsPostRequest) TargetGroup(targetGroup TargetGroup) ApiTargetgroupsPostRequest { + r.targetGroup = &targetGroup + return r +} +func (r ApiTargetgroupsPostRequest) Pretty(pretty bool) ApiTargetgroupsPostRequest { + r.pretty = &pretty + return r +} +func (r ApiTargetgroupsPostRequest) Depth(depth int32) ApiTargetgroupsPostRequest { + r.depth = &depth + return r +} +func (r ApiTargetgroupsPostRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsPostRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiTargetgroupsPostRequest) Execute() (TargetGroup, *APIResponse, error) { + return r.ApiService.TargetgroupsPostExecute(r) +} + +/* + * TargetgroupsPost Create a Target Group + * Creates a target group. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiTargetgroupsPostRequest + */ +func (a *TargetGroupsApiService) TargetgroupsPost(ctx _context.Context) ApiTargetgroupsPostRequest { + return ApiTargetgroupsPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return TargetGroup + */ +func (a *TargetGroupsApiService) TargetgroupsPostExecute(r ApiTargetgroupsPostRequest) (TargetGroup, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TargetGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsPost") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/targetgroups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.targetGroup == nil { + return localVarReturnValue, nil, reportError("targetGroup is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.targetGroup + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "TargetgroupsPost", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} + +type ApiTargetgroupsPutRequest struct { + ctx _context.Context + ApiService *TargetGroupsApiService + targetGroupId string + targetGroup *TargetGroupPut + pretty *bool + depth *int32 + xContractNumber *int32 +} + +func (r ApiTargetgroupsPutRequest) TargetGroup(targetGroup TargetGroupPut) ApiTargetgroupsPutRequest { + r.targetGroup = &targetGroup + return r +} +func (r ApiTargetgroupsPutRequest) Pretty(pretty bool) ApiTargetgroupsPutRequest { + r.pretty = &pretty + return r +} +func (r ApiTargetgroupsPutRequest) Depth(depth int32) ApiTargetgroupsPutRequest { + r.depth = &depth + return r +} +func (r ApiTargetgroupsPutRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsPutRequest { + r.xContractNumber = &xContractNumber + return r +} + +func (r ApiTargetgroupsPutRequest) Execute() (TargetGroup, *APIResponse, error) { + return r.ApiService.TargetgroupsPutExecute(r) +} + +/* + * TargetgroupsPut Modify a Target Group by ID + * Modifies the properties of the target group specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param targetGroupId The unique ID of the target group. + * @return ApiTargetgroupsPutRequest + */ +func (a *TargetGroupsApiService) TargetgroupsPut(ctx _context.Context, targetGroupId string) ApiTargetgroupsPutRequest { + return ApiTargetgroupsPutRequest{ + ApiService: a, + ctx: ctx, + targetGroupId: targetGroupId, + } +} + +/* + * Execute executes the request + * @return TargetGroup + */ +func (a *TargetGroupsApiService) TargetgroupsPutExecute(r ApiTargetgroupsPutRequest) (TargetGroup, *APIResponse, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TargetGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsPut") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/targetgroups/{targetGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.targetGroup == nil { + return localVarReturnValue, nil, reportError("targetGroup is required and must be specified") + } + + if r.pretty != nil { + localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") + if defaultQueryParam == "" { + localVarQueryParams.Add("pretty", parameterToString(true, "")) + } + } + if r.depth != nil { + localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) + } else { + defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") + if defaultQueryParam == "" { + localVarQueryParams.Add("depth", parameterToString(0, "")) + } + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.xContractNumber != nil { + localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") + } + // body params + localVarPostBody = r.targetGroup + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["Token Authentication"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) + + localVarAPIResponse := &APIResponse{ + Response: localVarHTTPResponse, + Method: localVarHTTPMethod, + RequestURL: localVarPath, + RequestTime: httpRequestTime, + Operation: "TargetgroupsPut", + } + + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarAPIResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarAPIResponse.Payload = localVarBody + if err != nil { + return localVarReturnValue, localVarAPIResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) + return localVarReturnValue, localVarAPIResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarAPIResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + statusCode: localVarHTTPResponse.StatusCode, + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarAPIResponse, newErr + } + + return localVarReturnValue, localVarAPIResponse, nil +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_templates.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_templates.go index 79f3a2d7095b..63451fc8e269 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_templates.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_templates.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -44,14 +44,12 @@ func (r ApiTemplatesFindByIdRequest) Execute() (Template, *APIResponse, error) { } /* - - TemplatesFindById Retrieve Cubes Templates - - Retrieve the properties of the specified Cubes Template. - -This operation is only supported for the Cubes. - - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param templateId The unique Template ID. - - @return ApiTemplatesFindByIdRequest -*/ + * TemplatesFindById Get Cubes Template by ID + * Retrieves the properties of the Cubes template specified by its ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param templateId The unique template ID. + * @return ApiTemplatesFindByIdRequest + */ func (a *TemplatesApiService) TemplatesFindById(ctx _context.Context, templateId string) ApiTemplatesFindByIdRequest { return ApiTemplatesFindByIdRequest{ ApiService: a, @@ -145,7 +143,7 @@ func (a *TemplatesApiService) TemplatesFindByIdExecute(r ApiTemplatesFindByIdReq return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -198,7 +196,7 @@ func (r ApiTemplatesGetRequest) Depth(depth int32) ApiTemplatesGetRequest { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiTemplatesGetRequest) Filter(key string, value string) ApiTemplatesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -219,12 +217,14 @@ func (r ApiTemplatesGetRequest) Execute() (Templates, *APIResponse, error) { } /* - - TemplatesGet List Cubes Templates - - List all of the available Cubes Templates. + - TemplatesGet Get Cubes Templates + - Retrieves all available templates. + +Templates provide a pre-defined configuration for Cube servers. -This operation is only supported for the Cubes. - - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @return ApiTemplatesGetRequest + >Templates are read-only and cannot be created, modified, or deleted by users. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiTemplatesGetRequest */ func (a *TemplatesApiService) TemplatesGet(ctx _context.Context) ApiTemplatesGetRequest { return ApiTemplatesGetRequest{ @@ -331,7 +331,7 @@ func (a *TemplatesApiService) TemplatesGetExecute(r ApiTemplatesGetRequest) (Tem return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_management.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_management.go index 4211df531077..f27c5a28029f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_management.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_management.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -162,7 +162,7 @@ func (a *UserManagementApiService) UmGroupsDeleteExecute(r ApiUmGroupsDeleteRequ return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -325,7 +325,7 @@ func (a *UserManagementApiService) UmGroupsFindByIdExecute(r ApiUmGroupsFindById return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -388,7 +388,7 @@ func (r ApiUmGroupsGetRequest) XContractNumber(xContractNumber int32) ApiUmGroup // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsGetRequest) Filter(key string, value string) ApiUmGroupsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -530,7 +530,7 @@ func (a *UserManagementApiService) UmGroupsGetExecute(r ApiUmGroupsGetRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -709,7 +709,7 @@ func (a *UserManagementApiService) UmGroupsPostExecute(r ApiUmGroupsPostRequest) return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -892,7 +892,7 @@ func (a *UserManagementApiService) UmGroupsPutExecute(r ApiUmGroupsPutRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -956,7 +956,7 @@ func (r ApiUmGroupsResourcesGetRequest) XContractNumber(xContractNumber int32) A // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsResourcesGetRequest) Filter(key string, value string) ApiUmGroupsResourcesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1101,7 +1101,7 @@ func (a *UserManagementApiService) UmGroupsResourcesGetExecute(r ApiUmGroupsReso return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1276,7 +1276,7 @@ func (a *UserManagementApiService) UmGroupsSharesDeleteExecute(r ApiUmGroupsShar return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1443,7 +1443,7 @@ func (a *UserManagementApiService) UmGroupsSharesFindByResourceIdExecute(r ApiUm return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1507,7 +1507,7 @@ func (r ApiUmGroupsSharesGetRequest) XContractNumber(xContractNumber int32) ApiU // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsSharesGetRequest) Filter(key string, value string) ApiUmGroupsSharesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1652,7 +1652,7 @@ func (a *UserManagementApiService) UmGroupsSharesGetExecute(r ApiUmGroupsSharesG return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1839,7 +1839,7 @@ func (a *UserManagementApiService) UmGroupsSharesPostExecute(r ApiUmGroupsShares return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2026,7 +2026,7 @@ func (a *UserManagementApiService) UmGroupsSharesPutExecute(r ApiUmGroupsSharesP return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2201,7 +2201,7 @@ func (a *UserManagementApiService) UmGroupsUsersDeleteExecute(r ApiUmGroupsUsers return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2255,7 +2255,7 @@ func (r ApiUmGroupsUsersGetRequest) XContractNumber(xContractNumber int32) ApiUm // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsUsersGetRequest) Filter(key string, value string) ApiUmGroupsUsersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2400,7 +2400,7 @@ func (a *UserManagementApiService) UmGroupsUsersGetExecute(r ApiUmGroupsUsersGet return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2468,8 +2468,8 @@ func (r ApiUmGroupsUsersPostRequest) Execute() (User, *APIResponse, error) { } /* - * UmGroupsUsersPost Add group members - * Add an existing user to the specified group. + * UmGroupsUsersPost Add a Group Member + * Adds an existing user to the specified group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsUsersPostRequest @@ -2583,7 +2583,7 @@ func (a *UserManagementApiService) UmGroupsUsersPostExecute(r ApiUmGroupsUsersPo return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2760,7 +2760,7 @@ func (a *UserManagementApiService) UmResourcesFindByTypeExecute(r ApiUmResources return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -2941,7 +2941,7 @@ func (a *UserManagementApiService) UmResourcesFindByTypeAndIdExecute(r ApiUmReso return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3004,7 +3004,7 @@ func (r ApiUmResourcesGetRequest) XContractNumber(xContractNumber int32) ApiUmRe // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmResourcesGetRequest) Filter(key string, value string) ApiUmResourcesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -3146,7 +3146,7 @@ func (a *UserManagementApiService) UmResourcesGetExecute(r ApiUmResourcesGetRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3317,7 +3317,7 @@ func (a *UserManagementApiService) UmUsersDeleteExecute(r ApiUmUsersDeleteReques return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3480,7 +3480,7 @@ func (a *UserManagementApiService) UmUsersFindByIdExecute(r ApiUmUsersFindByIdRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3553,7 +3553,7 @@ func (r ApiUmUsersGetRequest) Limit(limit int32) ApiUmUsersGetRequest { // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersGetRequest) Filter(key string, value string) ApiUmUsersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -3711,7 +3711,7 @@ func (a *UserManagementApiService) UmUsersGetExecute(r ApiUmUsersGetRequest) (Us return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3775,7 +3775,7 @@ func (r ApiUmUsersGroupsGetRequest) XContractNumber(xContractNumber int32) ApiUm // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersGroupsGetRequest) Filter(key string, value string) ApiUmUsersGroupsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -3920,7 +3920,7 @@ func (a *UserManagementApiService) UmUsersGroupsGetExecute(r ApiUmUsersGroupsGet return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -3984,7 +3984,7 @@ func (r ApiUmUsersOwnsGetRequest) XContractNumber(xContractNumber int32) ApiUmUs // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersOwnsGetRequest) Filter(key string, value string) ApiUmUsersOwnsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -4129,7 +4129,7 @@ func (a *UserManagementApiService) UmUsersOwnsGetExecute(r ApiUmUsersOwnsGetRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4308,7 +4308,7 @@ func (a *UserManagementApiService) UmUsersPostExecute(r ApiUmUsersPostRequest) ( return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -4491,7 +4491,7 @@ func (a *UserManagementApiService) UmUsersPutExecute(r ApiUmUsersPutRequest) (Us return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_s3_keys.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_s3_keys.go index d4a943a5fa29..c8302e01e606 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_s3_keys.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_user_s3_keys.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -166,7 +166,7 @@ func (a *UserS3KeysApiService) UmUsersS3keysDeleteExecute(r ApiUmUsersS3keysDele return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -333,7 +333,7 @@ func (a *UserS3KeysApiService) UmUsersS3keysFindByKeyIdExecute(r ApiUmUsersS3key return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -397,7 +397,7 @@ func (r ApiUmUsersS3keysGetRequest) XContractNumber(xContractNumber int32) ApiUm // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersS3keysGetRequest) Filter(key string, value string) ApiUmUsersS3keysGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -542,7 +542,7 @@ func (a *UserS3KeysApiService) UmUsersS3keysGetExecute(r ApiUmUsersS3keysGetRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -715,7 +715,7 @@ func (a *UserS3KeysApiService) UmUsersS3keysPostExecute(r ApiUmUsersS3keysPostRe return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -784,8 +784,8 @@ func (r ApiUmUsersS3keysPutRequest) Execute() (S3Key, *APIResponse, error) { } /* - * UmUsersS3keysPut Modify S3 keys by key ID - * Enable or disable the specified user S3 key. + * UmUsersS3keysPut Modify a S3 Key by Key ID + * Enables or disables the specified user S3 key. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @param keyId The unique ID of the S3 key. @@ -902,7 +902,7 @@ func (a *UserS3KeysApiService) UmUsersS3keysPutExecute(r ApiUmUsersS3keysPutRequ return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -961,7 +961,7 @@ func (r ApiUmUsersS3ssourlGetRequest) XContractNumber(xContractNumber int32) Api // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersS3ssourlGetRequest) Filter(key string, value string) ApiUmUsersS3ssourlGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1098,7 +1098,7 @@ func (a *UserS3KeysApiService) UmUsersS3ssourlGetExecute(r ApiUmUsersS3ssourlGet return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_volumes.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_volumes.go index 5c88037315c6..d7f5e37787b2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_volumes.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/api_volumes.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -200,7 +200,7 @@ func (a *VolumesApiService) DatacentersVolumesCreateSnapshotPostExecute(r ApiDat return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -375,7 +375,7 @@ func (a *VolumesApiService) DatacentersVolumesDeleteExecute(r ApiDatacentersVolu return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -542,7 +542,7 @@ func (a *VolumesApiService) DatacentersVolumesFindByIdExecute(r ApiDatacentersVo return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -616,7 +616,7 @@ func (r ApiDatacentersVolumesGetRequest) Limit(limit int32) ApiDatacentersVolume // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersVolumesGetRequest) Filter(key string, value string) ApiDatacentersVolumesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) - r.filters[filterKey] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -777,7 +777,7 @@ func (a *VolumesApiService) DatacentersVolumesGetExecute(r ApiDatacentersVolumes return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -964,7 +964,7 @@ func (a *VolumesApiService) DatacentersVolumesPatchExecute(r ApiDatacentersVolum return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1032,8 +1032,8 @@ func (r ApiDatacentersVolumesPostRequest) Execute() (Volume, *APIResponse, error } /* - * DatacentersVolumesPost Create volumes - * Create a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section. + * DatacentersVolumesPost Create a Volume + * Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersVolumesPostRequest @@ -1147,7 +1147,7 @@ func (a *VolumesApiService) DatacentersVolumesPostExecute(r ApiDatacentersVolume return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1216,8 +1216,8 @@ func (r ApiDatacentersVolumesPutRequest) Execute() (Volume, *APIResponse, error) } /* - * DatacentersVolumesPut Modify volumes - * Modify the properties of the specified volume within the data center. + * DatacentersVolumesPut Modify a Volume by ID + * Modifies the properties of the specified volume within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. @@ -1334,7 +1334,7 @@ func (a *VolumesApiService) DatacentersVolumesPutExecute(r ApiDatacentersVolumes return localVarReturnValue, localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1517,7 +1517,7 @@ func (a *VolumesApiService) DatacentersVolumesRestoreSnapshotPostExecute(r ApiDa return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/client.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/client.go index e88d2add264d..fe8471d96fb4 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/client.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/client.go @@ -13,14 +13,17 @@ package ionoscloud import ( "bytes" "context" + "crypto/sha256" + "crypto/tls" + "crypto/x509" + "encoding/hex" "encoding/json" "encoding/xml" "errors" "fmt" "io" - "io/ioutil" - "log" "mime/multipart" + "net" "net/http" "net/http/httputil" "net/url" @@ -49,7 +52,7 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "6.0.2" + Version = "6.1.11" ) // Constants for APIs @@ -66,6 +69,8 @@ type APIClient struct { DefaultApi *DefaultApiService + ApplicationLoadBalancersApi *ApplicationLoadBalancersApiService + BackupUnitsApi *BackupUnitsApiService ContractResourcesApi *ContractResourcesApiService @@ -104,6 +109,8 @@ type APIClient struct { SnapshotsApi *SnapshotsApiService + TargetGroupsApi *TargetGroupsApiService + TemplatesApi *TemplatesApiService UserManagementApi *UserManagementApiService @@ -123,6 +130,13 @@ func NewAPIClient(cfg *Configuration) *APIClient { if cfg.HTTPClient == nil { cfg.HTTPClient = http.DefaultClient } + //enable certificate pinning if the env variable is set + pkFingerprint := os.Getenv(IonosPinnedCertEnvVar) + if pkFingerprint != "" { + httpTransport := &http.Transport{} + AddPinnedCert(httpTransport, pkFingerprint) + cfg.HTTPClient.Transport = httpTransport + } c := &APIClient{} c.cfg = cfg @@ -130,6 +144,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.DefaultApi = (*DefaultApiService)(&c.common) + c.ApplicationLoadBalancersApi = (*ApplicationLoadBalancersApiService)(&c.common) c.BackupUnitsApi = (*BackupUnitsApiService)(&c.common) c.ContractResourcesApi = (*ContractResourcesApiService)(&c.common) c.DataCentersApi = (*DataCentersApiService)(&c.common) @@ -149,6 +164,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.RequestsApi = (*RequestsApiService)(&c.common) c.ServersApi = (*ServersApiService)(&c.common) c.SnapshotsApi = (*SnapshotsApiService)(&c.common) + c.TargetGroupsApi = (*TargetGroupsApiService)(&c.common) c.TemplatesApi = (*TemplatesApiService)(&c.common) c.UserManagementApi = (*UserManagementApiService)(&c.common) c.UserS3KeysApi = (*UserS3KeysApiService)(&c.common) @@ -157,6 +173,63 @@ func NewAPIClient(cfg *Configuration) *APIClient { return c } +// AddPinnedCert - enables pinning of the sha256 public fingerprint to the http client's transport +func AddPinnedCert(transport *http.Transport, pkFingerprint string) { + if pkFingerprint != "" { + transport.DialTLSContext = addPinnedCertVerification([]byte(pkFingerprint), new(tls.Config)) + } +} + +// TLSDial can be assigned to a http.Transport's DialTLS field. +type TLSDial func(ctx context.Context, network, addr string) (net.Conn, error) + +// AddPinnedCertVerification returns a TLSDial function which checks that +// the remote server provides a certificate whose SHA256 fingerprint matches +// the provided value. +// +// The returned dialer function can be plugged into a http.Transport's DialTLS +// field to allow for certificate pinning. +func addPinnedCertVerification(fingerprint []byte, tlsConfig *tls.Config) TLSDial { + return func(ctx context.Context, network, addr string) (net.Conn, error) { + //fingerprints can be added with ':', we need to trim + fingerprint = bytes.ReplaceAll(fingerprint, []byte(":"), []byte("")) + fingerprint = bytes.ReplaceAll(fingerprint, []byte(" "), []byte("")) + //we are manually checking a certificate, so we need to enable insecure + tlsConfig.InsecureSkipVerify = true + + // Dial the connection to get certificates to check + conn, err := tls.Dial(network, addr, tlsConfig) + if err != nil { + return nil, err + } + + if err := verifyPinnedCert(fingerprint, conn.ConnectionState().PeerCertificates); err != nil { + _ = conn.Close() + return nil, err + } + + return conn, nil + } +} + +// verifyPinnedCert iterates the list of peer certificates and attempts to +// locate a certificate that is not a CA and whose public key fingerprint matches pkFingerprint. +func verifyPinnedCert(pkFingerprint []byte, peerCerts []*x509.Certificate) error { + for _, cert := range peerCerts { + fingerprint := sha256.Sum256(cert.Raw) + + var bytesFingerPrint = make([]byte, hex.EncodedLen(len(fingerprint[:]))) + hex.Encode(bytesFingerPrint, fingerprint[:]) + + // we have a match, and it's not an authority certificate + if cert.IsCA == false && bytes.EqualFold(bytesFingerPrint, pkFingerprint) { + return nil + } + } + + return fmt.Errorf("remote server presented a certificate which does not match the provided fingerprint") +} + func atoi(in string) (int, error) { return strconv.Atoi(in) } @@ -263,14 +336,14 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio } } - if c.cfg.Debug { + if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Trace) { dump, err := httputil.DumpRequestOut(clonedRequest, true) if err == nil { - log.Printf(" [DEBUG] DumpRequestOut : %s\n", string(dump)) + c.cfg.Logger.Printf(" DumpRequestOut : %s\n", string(dump)) } else { - log.Println("[DEBUG] DumpRequestOut err: ", err) + c.cfg.Logger.Printf(" DumpRequestOut err: %+v", err) } - log.Printf("\n try no: %d\n", retryCount) + c.cfg.Logger.Printf("\n try no: %d\n", retryCount) } httpRequestStartTime := time.Now() @@ -281,12 +354,12 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio return resp, httpRequestTime, err } - if c.cfg.Debug { + if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Trace) { dump, err := httputil.DumpResponse(resp, true) if err == nil { - log.Printf("\n [DEBUG] DumpResponse : %s\n", string(dump)) + c.cfg.Logger.Printf("\n DumpResponse : %s\n", string(dump)) } else { - log.Println("[DEBUG] DumpResponse err ", err) + c.cfg.Logger.Printf(" DumpResponse err %+v", err) } } @@ -296,6 +369,9 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio case http.StatusServiceUnavailable, http.StatusGatewayTimeout, http.StatusBadGateway: + if request.Method == http.MethodPost { + return resp, httpRequestTime, err + } backoffTime = c.GetConfig().WaitTime case http.StatusTooManyRequests: @@ -314,26 +390,37 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio } if retryCount >= c.GetConfig().MaxRetries { - if c.cfg.Debug { - log.Printf("number of maximum retries exceeded (%d retries)\n", c.cfg.MaxRetries) + if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Debug) { + c.cfg.Logger.Printf(" Number of maximum retries exceeded (%d retries)\n", c.cfg.MaxRetries) } break } else { - c.backOff(backoffTime) + c.backOff(request.Context(), backoffTime) } } return resp, httpRequestTime, err } -func (c *APIClient) backOff(t time.Duration) { +func (c *APIClient) backOff(ctx context.Context, t time.Duration) { if t > c.GetConfig().MaxWaitTime { t = c.GetConfig().MaxWaitTime } - if c.cfg.Debug { - log.Printf("sleeping %s before retrying request\n", t.String()) + if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Debug) { + c.cfg.Logger.Printf(" sleeping %s before retrying request\n", t.String()) + } + + if t <= 0 { + return + } + + timer := time.NewTimer(t) + defer timer.Stop() + + select { + case <-ctx.Done(): + case <-timer.C: } - time.Sleep(t) } // Allow modification of underlying config for alternate implementations and testing @@ -356,6 +443,15 @@ func (c *APIClient) prepareRequest( var body *bytes.Buffer + val, isSetInEnv := os.LookupEnv(IonosContractNumber) + _, isSetInMap := headerParams["X-Contract-Number"] + if headerParams == nil { + headerParams = make(map[string]string) + } + if !isSetInMap && isSetInEnv { + headerParams["X-Contract-Number"] = val + } + // Detect postBody type and post. if postBody != nil { contentType := headerParams["Content-Type"] @@ -562,7 +658,7 @@ func (c *APIClient) GetRequestStatus(ctx context.Context, path string) (*Request var responseBody = make([]byte, 0) if resp != nil { var errRead error - responseBody, errRead = ioutil.ReadAll(resp.Body) + responseBody, errRead = io.ReadAll(resp.Body) _ = resp.Body.Close() if errRead != nil { return nil, nil, errRead @@ -594,6 +690,216 @@ func (c *APIClient) GetRequestStatus(ctx context.Context, path string) (*Request } +type ResourceHandler interface { + GetMetadata() *DatacenterElementMetadata + GetMetadataOk() (*DatacenterElementMetadata, bool) +} + +const ( + Available string = "AVAILABLE" + Busy = "BUSY" + Inactive = "INACTIVE" + Deploying = "DEPLOYING" + Active = "ACTIVE" + Failed = "FAILED" + Suspended = "SUSPENDED" + FailedSuspended = "FAILED_SUSPENDED" + Updating = "UPDATING" + FailedUpdating = "FAILED_UPDATING" + Destroying = "DESTROYING" + FailedDestroying = "FAILED_DESTROYING" + Terminated = "TERMINATED" +) + +type resourceGetCallFn func(apiClient *APIClient, resourceID string) (ResourceHandler, error) +type resourceDeleteCallFn func(apiClient *APIClient, resourceID string) (*APIResponse, error) + +type StateChannel struct { + Msg string + Err error +} + +type DeleteStateChannel struct { + Msg int + Err error +} + +// fn() is a function that returns from the API the resource you want to check it's state. +// Successful states that can be checked: Available, or Active +func (c *APIClient) WaitForState(ctx context.Context, fn resourceGetCallFn, resourceID string) (bool, error) { + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + + for { + select { + case <-ctx.Done(): + return false, ctx.Err() + case <-ticker.C: + resource, err := fn(c, resourceID) + if err != nil { + return false, fmt.Errorf("error occurred when calling the fn function: %w", err) + } + if resource == nil { + return false, errors.New("fail to get resource") + } + if metadata := resource.GetMetadata(); metadata != nil { + if state, ok := metadata.GetStateOk(); ok && state != nil { + if *state == Available || *state == Active { + return true, nil + } + if *state == Failed || *state == FailedSuspended || *state == FailedUpdating { + return false, errors.New("state of the resource is " + *state) + } + } + } else { + return false, errors.New("metadata could not be retrieved from the fn API call") + } + } + continue + } +} + +// fn() is a function that returns from the API the resource you want to check it's state +// the channel is of type StateChannel and it represents the state of the resource. Successful states that can be checked: Available, or Active +func (c *APIClient) waitForStateWithChanel(ctx context.Context, fn resourceGetCallFn, resourceID string, ch chan<- StateChannel) { + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + done := make(chan bool, 1) + + for { + select { + case <-ctx.Done(): + ch <- StateChannel{ + "", + ctx.Err(), + } + return + case <-done: + return + case <-ticker.C: + resource, err := fn(c, resourceID) + if err != nil { + ch <- StateChannel{ + "", + fmt.Errorf("error occurred when calling the fn function: %w", err), + } + } else if resource == nil { + ch <- StateChannel{ + "", + errors.New("fail to get resource"), + } + } else if metadata := resource.GetMetadata(); metadata != nil { + if state, ok := metadata.GetStateOk(); ok && state != nil { + if *state == Available || *state == Active { + ch <- StateChannel{ + *state, + nil, + } + } + if *state == Failed || *state == FailedSuspended || *state == FailedUpdating { + ch <- StateChannel{ + "", + errors.New("state of the resource is " + *state), + } + } + } + } else { + ch <- StateChannel{ + "", + errors.New("metadata could not be retrieved from the fn API call"), + } + } + done <- true + } + continue + } +} + +// fn() is a function that returns from the API the resource you want to check it's state +// the channel is of type StateChannel and it represents the state of the resource. Successful states that can be checked: Available, or Active +func (c *APIClient) WaitForStateAsync(ctx context.Context, fn resourceGetCallFn, resourceID string, ch chan<- StateChannel) { + go c.waitForStateWithChanel(ctx, fn, resourceID, ch) +} + +// fn() is a function that returns from the API the resource you want to check it's state. +// a resource is deleted when status code 404 is returned from the get call to API +func (c *APIClient) WaitForDeletion(ctx context.Context, fn resourceDeleteCallFn, resourceID string) (bool, error) { + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + + for { + select { + case <-ctx.Done(): + return false, ctx.Err() + case <-ticker.C: + apiResponse, err := fn(c, resourceID) + if err != nil { + if apiResponse == nil { + return false, fmt.Errorf("fail to get response: %w", err) + } + if apiResp := apiResponse.Response; apiResp != nil { + if apiResp.StatusCode == http.StatusNotFound { + return true, nil + } + } + return false, err + } + } + continue + } +} + +// fn() is a function that returns from the API the resource you want to check it's state +// the channel is of type int and it represents the status response of the resource, which in this case is 404 to check when the resource is not found. +func (c *APIClient) waitForDeletionWithChannel(ctx context.Context, fn resourceDeleteCallFn, resourceID string, ch chan<- DeleteStateChannel) { + ticker := time.NewTicker(1 * time.Second) + defer ticker.Stop() + done := make(chan bool, 1) + + for { + select { + case <-ctx.Done(): + ch <- DeleteStateChannel{ + 0, + ctx.Err(), + } + return + case <-done: + return + case <-ticker.C: + apiResponse, err := fn(c, resourceID) + if err != nil { + if apiResponse == nil { + ch <- DeleteStateChannel{ + 0, + fmt.Errorf("API Response from fn is empty: %w ", err), + } + } else if apiresp := apiResponse.Response; apiresp != nil { + if statusCode := apiresp.StatusCode; statusCode == http.StatusNotFound { + ch <- DeleteStateChannel{ + statusCode, + nil, + } + } else { + ch <- DeleteStateChannel{ + statusCode, + err, + } + } + done <- true + } + } + } + continue + } +} + +// fn() is a function that returns from the API the resource you want to check it's state +// the channel is of type int and it represents the status response of the resource, which in this case is 404 to check when the resource is not found. +func (c *APIClient) WaitForDeletionAsync(ctx context.Context, fn resourceDeleteCallFn, resourceID string, ch chan<- DeleteStateChannel) { + go c.waitForDeletionWithChannel(ctx, fn, resourceID, ch) +} + func (c *APIClient) WaitForRequest(ctx context.Context, path string) (*APIResponse, error) { var ( @@ -622,7 +928,7 @@ func (c *APIClient) WaitForRequest(ctx context.Context, path string) (*APIRespon var localVarBody = make([]byte, 0) if resp != nil { var errRead error - localVarBody, errRead = ioutil.ReadAll(resp.Body) + localVarBody, errRead = io.ReadAll(resp.Body) _ = resp.Body.Close() if errRead != nil { return nil, errRead @@ -651,7 +957,8 @@ func (c *APIClient) WaitForRequest(ctx context.Context, path string) (*APIRespon } if resp.StatusCode != http.StatusOK { - return localVarAPIResponse, fmt.Errorf("WaitForRequest failed; received status code %d from API", resp.StatusCode) + msg := fmt.Sprintf("WaitForRequest failed; received status code %d from API", resp.StatusCode) + return localVarAPIResponse, NewGenericOpenAPIError(msg, localVarBody, nil, resp.StatusCode) } if status.Metadata != nil && status.Metadata.Status != nil { switch *status.Metadata.Status { @@ -666,9 +973,7 @@ func (c *APIClient) WaitForRequest(ctx context.Context, path string) (*APIRespon if status.Metadata.Message != nil { message = *status.Metadata.Message } - return localVarAPIResponse, errors.New( - fmt.Sprintf("Request %s failed: %s", id, message), - ) + return localVarAPIResponse, fmt.Errorf("Request %s failed: %s", id, message) } } select { @@ -808,7 +1113,7 @@ func strlen(s string) int { return utf8.RuneCountInString(s) } -// GenericOpenAPIError Provides access to the body, error and model on returned errors. +// GenericOpenAPIError provides access to the body, error and model on returned errors. type GenericOpenAPIError struct { statusCode int body []byte @@ -816,21 +1121,52 @@ type GenericOpenAPIError struct { model interface{} } +// NewGenericOpenAPIError - constructor for GenericOpenAPIError +func NewGenericOpenAPIError(message string, body []byte, model interface{}, statusCode int) GenericOpenAPIError { + return GenericOpenAPIError{ + statusCode: statusCode, + body: body, + error: message, + model: model, + } +} + // Error returns non-empty string if there was an error. func (e GenericOpenAPIError) Error() string { return e.error } +// SetError sets the error string +func (e *GenericOpenAPIError) SetError(error string) { + e.error = error +} + // Body returns the raw bytes of the response func (e GenericOpenAPIError) Body() []byte { return e.body } +// SetBody sets the raw body of the error +func (e *GenericOpenAPIError) SetBody(body []byte) { + e.body = body +} + // Model returns the unpacked model of the error func (e GenericOpenAPIError) Model() interface{} { return e.model } +// SetModel sets the model of the error +func (e *GenericOpenAPIError) SetModel(model interface{}) { + e.model = model +} + +// StatusCode returns the status code of the error func (e GenericOpenAPIError) StatusCode() int { return e.statusCode } + +// SetStatusCode sets the status code of the error +func (e *GenericOpenAPIError) SetStatusCode(statusCode int) { + e.statusCode = statusCode +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/configuration.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/configuration.go index f3ee9461773e..cb0488ae058b 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/configuration.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/configuration.go @@ -26,6 +26,9 @@ const ( IonosPasswordEnvVar = "IONOS_PASSWORD" IonosTokenEnvVar = "IONOS_TOKEN" IonosApiUrlEnvVar = "IONOS_API_URL" + IonosPinnedCertEnvVar = "IONOS_PINNED_CERT" + IonosLogLevelEnvVar = "IONOS_LOG_LEVEL" + IonosContractNumber = "IONOS_CONTRACT_NUMBER" DefaultIonosServerUrl = "https://api.ionos.com/cloudapi/v6" DefaultIonosBasePath = "/cloudapi/v6" defaultMaxRetries = 3 @@ -108,16 +111,19 @@ type Configuration struct { DefaultHeader map[string]string `json:"defaultHeader,omitempty"` DefaultQueryParams url.Values `json:"defaultQueryParams,omitempty"` UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - Token string `json:"token,omitempty"` - MaxRetries int `json:"maxRetries,omitempty"` - WaitTime time.Duration `json:"waitTime,omitempty"` - MaxWaitTime time.Duration `json:"maxWaitTime,omitempty"` + // Debug is deprecated, will be replaced by LogLevel + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + Token string `json:"token,omitempty"` + MaxRetries int `json:"maxRetries,omitempty"` + WaitTime time.Duration `json:"waitTime,omitempty"` + MaxWaitTime time.Duration `json:"maxWaitTime,omitempty"` + LogLevel LogLevel + Logger Logger } // NewConfiguration returns a new Configuration object @@ -125,7 +131,7 @@ func NewConfiguration(username, password, token, hostUrl string) *Configuration cfg := &Configuration{ DefaultHeader: make(map[string]string), DefaultQueryParams: url.Values{}, - UserAgent: "ionos-cloud-sdk-go/v6.0.2", + UserAgent: "ionos-cloud-sdk-go/v6.1.11", Debug: false, Username: username, Password: password, @@ -133,6 +139,10 @@ func NewConfiguration(username, password, token, hostUrl string) *Configuration MaxRetries: defaultMaxRetries, MaxWaitTime: defaultMaxWaitTime, WaitTime: defaultWaitTime, + Logger: NewDefaultLogger(), + LogLevel: getLogLevelFromEnv(), + Host: getHost(hostUrl), + Scheme: getScheme(hostUrl), Servers: ServerConfigurations{ { URL: getServerUrl(hostUrl), @@ -260,6 +270,26 @@ func getServerUrl(serverUrl string) string { return serverUrl } +func getHost(serverUrl string) string { + // url.Parse only interprets the host correctly when the scheme is set, so we prepend one here if needed + if !strings.HasPrefix(serverUrl, "https://") && !strings.HasPrefix(serverUrl, "http://") { + serverUrl = "http://" + serverUrl + } + url, err := url.Parse(serverUrl) + if err != nil { + return "" + } + return url.Host +} + +func getScheme(serverUrl string) string { + url, err := url.Parse(serverUrl) + if err != nil { + return "" + } + return url.Scheme +} + // ServerURLWithContext returns a new server URL given an endpoint func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { sc, ok := c.OperationServers[endpoint] diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/logger.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/logger.go new file mode 100644 index 000000000000..c6d594651418 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/logger.go @@ -0,0 +1,80 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "log" + "os" + "strings" +) + +type LogLevel uint + +func (l *LogLevel) Get() LogLevel { + if l != nil { + return *l + } + return Off +} + +// Satisfies returns true if this LogLevel is at least high enough for v +func (l *LogLevel) Satisfies(v LogLevel) bool { + return l.Get() >= v +} + +const ( + Off LogLevel = 0x100 * iota + Debug + // Trace We recommend you only set this field for debugging purposes. + // Disable it in your production environments because it can log sensitive data. + // It logs the full request and response without encryption, even for an HTTPS call. + // Verbose request and response logging can also significantly impact your application's performance. + Trace +) + +var LogLevelMap = map[string]LogLevel{ + "off": Off, + "debug": Debug, + "trace": Trace, +} + +// getLogLevelFromEnv - gets LogLevel type from env variable IONOS_LOG_LEVEL +// returns Off if an invalid log level is encountered +func getLogLevelFromEnv() LogLevel { + strLogLevel := "off" + if os.Getenv(IonosLogLevelEnvVar) != "" { + strLogLevel = os.Getenv(IonosLogLevelEnvVar) + } + + logLevel, ok := LogLevelMap[strings.ToLower(strLogLevel)] + if !ok { + log.Printf("Cannot set logLevel for value: %s, setting loglevel to Off", strLogLevel) + } + return logLevel +} + +type Logger interface { + Printf(format string, args ...interface{}) +} + +func NewDefaultLogger() Logger { + return &defaultLogger{ + logger: log.New(os.Stderr, "IONOSLOG ", log.LstdFlags), + } +} + +type defaultLogger struct { + logger *log.Logger +} + +func (l defaultLogger) Printf(format string, args ...interface{}) { + l.logger.Printf(format, args...) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer.go new file mode 100644 index 000000000000..61cf511883fd --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer.go @@ -0,0 +1,341 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancer struct for ApplicationLoadBalancer +type ApplicationLoadBalancer struct { + Entities *ApplicationLoadBalancerEntities `json:"entities,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` + Properties *ApplicationLoadBalancerProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewApplicationLoadBalancer instantiates a new ApplicationLoadBalancer 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 NewApplicationLoadBalancer(properties ApplicationLoadBalancerProperties) *ApplicationLoadBalancer { + this := ApplicationLoadBalancer{} + + this.Properties = &properties + + return &this +} + +// NewApplicationLoadBalancerWithDefaults instantiates a new ApplicationLoadBalancer 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 NewApplicationLoadBalancerWithDefaults() *ApplicationLoadBalancer { + this := ApplicationLoadBalancer{} + return &this +} + +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancer) GetEntities() *ApplicationLoadBalancerEntities { + if o == nil { + return nil + } + + return o.Entities + +} + +// GetEntitiesOk returns a tuple with the Entities field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancer) GetEntitiesOk() (*ApplicationLoadBalancerEntities, bool) { + if o == nil { + return nil, false + } + + return o.Entities, true +} + +// SetEntities sets field value +func (o *ApplicationLoadBalancer) SetEntities(v ApplicationLoadBalancerEntities) { + + o.Entities = &v + +} + +// HasEntities returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasEntities() bool { + if o != nil && o.Entities != nil { + return true + } + + return false +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancer) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancer) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *ApplicationLoadBalancer) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancer) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancer) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *ApplicationLoadBalancer) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancer) GetMetadata() *DatacenterElementMetadata { + if o == nil { + return nil + } + + return o.Metadata + +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancer) GetMetadataOk() (*DatacenterElementMetadata, bool) { + if o == nil { + return nil, false + } + + return o.Metadata, true +} + +// SetMetadata sets field value +func (o *ApplicationLoadBalancer) SetMetadata(v DatacenterElementMetadata) { + + o.Metadata = &v + +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasMetadata() bool { + if o != nil && o.Metadata != nil { + return true + } + + return false +} + +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancer) GetProperties() *ApplicationLoadBalancerProperties { + if o == nil { + return nil + } + + return o.Properties + +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancer) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool) { + if o == nil { + return nil, false + } + + return o.Properties, true +} + +// SetProperties sets field value +func (o *ApplicationLoadBalancer) SetProperties(v ApplicationLoadBalancerProperties) { + + o.Properties = &v + +} + +// HasProperties returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasProperties() bool { + if o != nil && o.Properties != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancer) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancer) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancer) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancer) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Entities != nil { + toSerialize["entities"] = o.Entities + } + + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + + if o.Properties != nil { + toSerialize["properties"] = o.Properties + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancer struct { + value *ApplicationLoadBalancer + isSet bool +} + +func (v NullableApplicationLoadBalancer) Get() *ApplicationLoadBalancer { + return v.value +} + +func (v *NullableApplicationLoadBalancer) Set(val *ApplicationLoadBalancer) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancer) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancer(val *ApplicationLoadBalancer) *NullableApplicationLoadBalancer { + return &NullableApplicationLoadBalancer{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_entities.go new file mode 100644 index 000000000000..425fceaa1ed1 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_entities.go @@ -0,0 +1,121 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerEntities struct for ApplicationLoadBalancerEntities +type ApplicationLoadBalancerEntities struct { + Forwardingrules *ApplicationLoadBalancerForwardingRules `json:"forwardingrules,omitempty"` +} + +// NewApplicationLoadBalancerEntities instantiates a new ApplicationLoadBalancerEntities 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 NewApplicationLoadBalancerEntities() *ApplicationLoadBalancerEntities { + this := ApplicationLoadBalancerEntities{} + + return &this +} + +// NewApplicationLoadBalancerEntitiesWithDefaults instantiates a new ApplicationLoadBalancerEntities 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 NewApplicationLoadBalancerEntitiesWithDefaults() *ApplicationLoadBalancerEntities { + this := ApplicationLoadBalancerEntities{} + return &this +} + +// GetForwardingrules returns the Forwardingrules field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerEntities) GetForwardingrules() *ApplicationLoadBalancerForwardingRules { + if o == nil { + return nil + } + + return o.Forwardingrules + +} + +// GetForwardingrulesOk returns a tuple with the Forwardingrules field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerEntities) GetForwardingrulesOk() (*ApplicationLoadBalancerForwardingRules, bool) { + if o == nil { + return nil, false + } + + return o.Forwardingrules, true +} + +// SetForwardingrules sets field value +func (o *ApplicationLoadBalancerEntities) SetForwardingrules(v ApplicationLoadBalancerForwardingRules) { + + o.Forwardingrules = &v + +} + +// HasForwardingrules returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerEntities) HasForwardingrules() bool { + if o != nil && o.Forwardingrules != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerEntities) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Forwardingrules != nil { + toSerialize["forwardingrules"] = o.Forwardingrules + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerEntities struct { + value *ApplicationLoadBalancerEntities + isSet bool +} + +func (v NullableApplicationLoadBalancerEntities) Get() *ApplicationLoadBalancerEntities { + return v.value +} + +func (v *NullableApplicationLoadBalancerEntities) Set(val *ApplicationLoadBalancerEntities) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerEntities) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerEntities) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerEntities(val *ApplicationLoadBalancerEntities) *NullableApplicationLoadBalancerEntities { + return &NullableApplicationLoadBalancerEntities{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerEntities) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerEntities) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule.go new file mode 100644 index 000000000000..e9e1bd5c917a --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule.go @@ -0,0 +1,298 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerForwardingRule struct for ApplicationLoadBalancerForwardingRule +type ApplicationLoadBalancerForwardingRule struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` + Properties *ApplicationLoadBalancerForwardingRuleProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewApplicationLoadBalancerForwardingRule instantiates a new ApplicationLoadBalancerForwardingRule 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 NewApplicationLoadBalancerForwardingRule(properties ApplicationLoadBalancerForwardingRuleProperties) *ApplicationLoadBalancerForwardingRule { + this := ApplicationLoadBalancerForwardingRule{} + + this.Properties = &properties + + return &this +} + +// NewApplicationLoadBalancerForwardingRuleWithDefaults instantiates a new ApplicationLoadBalancerForwardingRule 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 NewApplicationLoadBalancerForwardingRuleWithDefaults() *ApplicationLoadBalancerForwardingRule { + this := ApplicationLoadBalancerForwardingRule{} + return &this +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRule) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRule) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRule) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRule) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRule) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRule) GetMetadata() *DatacenterElementMetadata { + if o == nil { + return nil + } + + return o.Metadata + +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { + if o == nil { + return nil, false + } + + return o.Metadata, true +} + +// SetMetadata sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { + + o.Metadata = &v + +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRule) HasMetadata() bool { + if o != nil && o.Metadata != nil { + return true + } + + return false +} + +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRule) GetProperties() *ApplicationLoadBalancerForwardingRuleProperties { + if o == nil { + return nil + } + + return o.Properties + +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRule) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { + if o == nil { + return nil, false + } + + return o.Properties, true +} + +// SetProperties sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { + + o.Properties = &v + +} + +// HasProperties returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRule) HasProperties() bool { + if o != nil && o.Properties != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRule) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRule) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + + if o.Properties != nil { + toSerialize["properties"] = o.Properties + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerForwardingRule struct { + value *ApplicationLoadBalancerForwardingRule + isSet bool +} + +func (v NullableApplicationLoadBalancerForwardingRule) Get() *ApplicationLoadBalancerForwardingRule { + return v.value +} + +func (v *NullableApplicationLoadBalancerForwardingRule) Set(val *ApplicationLoadBalancerForwardingRule) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerForwardingRule) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerForwardingRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerForwardingRule(val *ApplicationLoadBalancerForwardingRule) *NullableApplicationLoadBalancerForwardingRule { + return &NullableApplicationLoadBalancerForwardingRule{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerForwardingRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_properties.go new file mode 100644 index 000000000000..b5adc750a9aa --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_properties.go @@ -0,0 +1,391 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerForwardingRuleProperties struct for ApplicationLoadBalancerForwardingRuleProperties +type ApplicationLoadBalancerForwardingRuleProperties struct { + // The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). + ClientTimeout *int32 `json:"clientTimeout,omitempty"` + // An array of items in the collection. The original order of rules is preserved during processing, except that rules of the 'FORWARD' type are processed after the rules with other defined actions. The relative order of the 'FORWARD' type rules is also preserved during the processing. + HttpRules *[]ApplicationLoadBalancerHttpRule `json:"httpRules,omitempty"` + // The listening (inbound) IP. + ListenerIp *string `json:"listenerIp"` + // The listening (inbound) port number; the valid range is 1 to 65535. + ListenerPort *int32 `json:"listenerPort"` + // The name of the Application Load Balancer forwarding rule. + Name *string `json:"name"` + // The balancing protocol. + Protocol *string `json:"protocol"` + // Array of items in the collection. + ServerCertificates *[]string `json:"serverCertificates,omitempty"` +} + +// NewApplicationLoadBalancerForwardingRuleProperties instantiates a new ApplicationLoadBalancerForwardingRuleProperties 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 NewApplicationLoadBalancerForwardingRuleProperties(listenerIp string, listenerPort int32, name string, protocol string) *ApplicationLoadBalancerForwardingRuleProperties { + this := ApplicationLoadBalancerForwardingRuleProperties{} + + this.ListenerIp = &listenerIp + this.ListenerPort = &listenerPort + this.Name = &name + this.Protocol = &protocol + + return &this +} + +// NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults instantiates a new ApplicationLoadBalancerForwardingRuleProperties 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 NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults() *ApplicationLoadBalancerForwardingRuleProperties { + this := ApplicationLoadBalancerForwardingRuleProperties{} + return &this +} + +// GetClientTimeout returns the ClientTimeout field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeout() *int32 { + if o == nil { + return nil + } + + return o.ClientTimeout + +} + +// GetClientTimeoutOk returns a tuple with the ClientTimeout field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeoutOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.ClientTimeout, true +} + +// SetClientTimeout sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetClientTimeout(v int32) { + + o.ClientTimeout = &v + +} + +// HasClientTimeout returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasClientTimeout() bool { + if o != nil && o.ClientTimeout != nil { + return true + } + + return false +} + +// GetHttpRules returns the HttpRules field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRules() *[]ApplicationLoadBalancerHttpRule { + if o == nil { + return nil + } + + return o.HttpRules + +} + +// GetHttpRulesOk returns a tuple with the HttpRules field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRulesOk() (*[]ApplicationLoadBalancerHttpRule, bool) { + if o == nil { + return nil, false + } + + return o.HttpRules, true +} + +// SetHttpRules sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetHttpRules(v []ApplicationLoadBalancerHttpRule) { + + o.HttpRules = &v + +} + +// HasHttpRules returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasHttpRules() bool { + if o != nil && o.HttpRules != nil { + return true + } + + return false +} + +// GetListenerIp returns the ListenerIp field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIp() *string { + if o == nil { + return nil + } + + return o.ListenerIp + +} + +// GetListenerIpOk returns a tuple with the ListenerIp field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIpOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.ListenerIp, true +} + +// SetListenerIp sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetListenerIp(v string) { + + o.ListenerIp = &v + +} + +// HasListenerIp returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasListenerIp() bool { + if o != nil && o.ListenerIp != nil { + return true + } + + return false +} + +// GetListenerPort returns the ListenerPort field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPort() *int32 { + if o == nil { + return nil + } + + return o.ListenerPort + +} + +// GetListenerPortOk returns a tuple with the ListenerPort field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.ListenerPort, true +} + +// SetListenerPort sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetListenerPort(v int32) { + + o.ListenerPort = &v + +} + +// HasListenerPort returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasListenerPort() bool { + if o != nil && o.ListenerPort != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// GetProtocol returns the Protocol field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocol() *string { + if o == nil { + return nil + } + + return o.Protocol + +} + +// GetProtocolOk returns a tuple with the Protocol field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Protocol, true +} + +// SetProtocol sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetProtocol(v string) { + + o.Protocol = &v + +} + +// HasProtocol returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasProtocol() bool { + if o != nil && o.Protocol != nil { + return true + } + + return false +} + +// GetServerCertificates returns the ServerCertificates field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificates() *[]string { + if o == nil { + return nil + } + + return o.ServerCertificates + +} + +// GetServerCertificatesOk returns a tuple with the ServerCertificates field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificatesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + + return o.ServerCertificates, true +} + +// SetServerCertificates sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetServerCertificates(v []string) { + + o.ServerCertificates = &v + +} + +// HasServerCertificates returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasServerCertificates() bool { + if o != nil && o.ServerCertificates != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClientTimeout != nil { + toSerialize["clientTimeout"] = o.ClientTimeout + } + + if o.HttpRules != nil { + toSerialize["httpRules"] = o.HttpRules + } + + if o.ListenerIp != nil { + toSerialize["listenerIp"] = o.ListenerIp + } + + if o.ListenerPort != nil { + toSerialize["listenerPort"] = o.ListenerPort + } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.Protocol != nil { + toSerialize["protocol"] = o.Protocol + } + + if o.ServerCertificates != nil { + toSerialize["serverCertificates"] = o.ServerCertificates + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerForwardingRuleProperties struct { + value *ApplicationLoadBalancerForwardingRuleProperties + isSet bool +} + +func (v NullableApplicationLoadBalancerForwardingRuleProperties) Get() *ApplicationLoadBalancerForwardingRuleProperties { + return v.value +} + +func (v *NullableApplicationLoadBalancerForwardingRuleProperties) Set(val *ApplicationLoadBalancerForwardingRuleProperties) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerForwardingRuleProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerForwardingRuleProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerForwardingRuleProperties(val *ApplicationLoadBalancerForwardingRuleProperties) *NullableApplicationLoadBalancerForwardingRuleProperties { + return &NullableApplicationLoadBalancerForwardingRuleProperties{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerForwardingRuleProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_put.go new file mode 100644 index 000000000000..d5e6f649a8e8 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rule_put.go @@ -0,0 +1,255 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerForwardingRulePut struct for ApplicationLoadBalancerForwardingRulePut +type ApplicationLoadBalancerForwardingRulePut struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + Properties *ApplicationLoadBalancerForwardingRuleProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewApplicationLoadBalancerForwardingRulePut instantiates a new ApplicationLoadBalancerForwardingRulePut 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 NewApplicationLoadBalancerForwardingRulePut(properties ApplicationLoadBalancerForwardingRuleProperties) *ApplicationLoadBalancerForwardingRulePut { + this := ApplicationLoadBalancerForwardingRulePut{} + + this.Properties = &properties + + return &this +} + +// NewApplicationLoadBalancerForwardingRulePutWithDefaults instantiates a new ApplicationLoadBalancerForwardingRulePut 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 NewApplicationLoadBalancerForwardingRulePutWithDefaults() *ApplicationLoadBalancerForwardingRulePut { + this := ApplicationLoadBalancerForwardingRulePut{} + return &this +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRulePut) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRulePut) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetProperties() *ApplicationLoadBalancerForwardingRuleProperties { + if o == nil { + return nil + } + + return o.Properties + +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { + if o == nil { + return nil, false + } + + return o.Properties, true +} + +// SetProperties sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { + + o.Properties = &v + +} + +// HasProperties returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRulePut) HasProperties() bool { + if o != nil && o.Properties != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRulePut) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Properties != nil { + toSerialize["properties"] = o.Properties + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerForwardingRulePut struct { + value *ApplicationLoadBalancerForwardingRulePut + isSet bool +} + +func (v NullableApplicationLoadBalancerForwardingRulePut) Get() *ApplicationLoadBalancerForwardingRulePut { + return v.value +} + +func (v *NullableApplicationLoadBalancerForwardingRulePut) Set(val *ApplicationLoadBalancerForwardingRulePut) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerForwardingRulePut) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerForwardingRulePut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerForwardingRulePut(val *ApplicationLoadBalancerForwardingRulePut) *NullableApplicationLoadBalancerForwardingRulePut { + return &NullableApplicationLoadBalancerForwardingRulePut{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerForwardingRulePut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rules.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rules.go new file mode 100644 index 000000000000..aae71997f3cf --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_forwarding_rules.go @@ -0,0 +1,385 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerForwardingRules struct for ApplicationLoadBalancerForwardingRules +type ApplicationLoadBalancerForwardingRules struct { + Links *PaginationLinks `json:"_links,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + // Array of items in the collection. + Items *[]ApplicationLoadBalancerForwardingRule `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` + // The offset (if specified in the request). + Offset *float32 `json:"offset,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewApplicationLoadBalancerForwardingRules instantiates a new ApplicationLoadBalancerForwardingRules 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 NewApplicationLoadBalancerForwardingRules() *ApplicationLoadBalancerForwardingRules { + this := ApplicationLoadBalancerForwardingRules{} + + return &this +} + +// NewApplicationLoadBalancerForwardingRulesWithDefaults instantiates a new ApplicationLoadBalancerForwardingRules 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 NewApplicationLoadBalancerForwardingRulesWithDefaults() *ApplicationLoadBalancerForwardingRules { + this := ApplicationLoadBalancerForwardingRules{} + return &this +} + +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetLinks() *PaginationLinks { + if o == nil { + return nil + } + + return o.Links + +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { + if o == nil { + return nil, false + } + + return o.Links, true +} + +// SetLinks sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { + + o.Links = &v + +} + +// HasLinks returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasLinks() bool { + if o != nil && o.Links != nil { + return true + } + + return false +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetItems() *[]ApplicationLoadBalancerForwardingRule { + if o == nil { + return nil + } + + return o.Items + +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetItemsOk() (*[]ApplicationLoadBalancerForwardingRule, bool) { + if o == nil { + return nil, false + } + + return o.Items, true +} + +// SetItems sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetItems(v []ApplicationLoadBalancerForwardingRule) { + + o.Items = &v + +} + +// HasItems returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetLimit() *float32 { + if o == nil { + return nil + } + + return o.Limit + +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { + if o == nil { + return nil, false + } + + return o.Limit, true +} + +// SetLimit sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetLimit(v float32) { + + o.Limit = &v + +} + +// HasLimit returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasLimit() bool { + if o != nil && o.Limit != nil { + return true + } + + return false +} + +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetOffset() *float32 { + if o == nil { + return nil + } + + return o.Offset + +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { + if o == nil { + return nil, false + } + + return o.Offset, true +} + +// SetOffset sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetOffset(v float32) { + + o.Offset = &v + +} + +// HasOffset returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerForwardingRules) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Links != nil { + toSerialize["_links"] = o.Links + } + + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Items != nil { + toSerialize["items"] = o.Items + } + + if o.Limit != nil { + toSerialize["limit"] = o.Limit + } + + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerForwardingRules struct { + value *ApplicationLoadBalancerForwardingRules + isSet bool +} + +func (v NullableApplicationLoadBalancerForwardingRules) Get() *ApplicationLoadBalancerForwardingRules { + return v.value +} + +func (v *NullableApplicationLoadBalancerForwardingRules) Set(val *ApplicationLoadBalancerForwardingRules) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerForwardingRules) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerForwardingRules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerForwardingRules(val *ApplicationLoadBalancerForwardingRules) *NullableApplicationLoadBalancerForwardingRules { + return &NullableApplicationLoadBalancerForwardingRules{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerForwardingRules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule.go new file mode 100644 index 000000000000..1d52893f52e3 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule.go @@ -0,0 +1,477 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerHttpRule struct for ApplicationLoadBalancerHttpRule +type ApplicationLoadBalancerHttpRule struct { + // An array of items in the collection. The action will be executed only if each condition is met; the rule will always be applied if no conditions are set. + Conditions *[]ApplicationLoadBalancerHttpRuleCondition `json:"conditions,omitempty"` + // Specifies the content type and is valid only for 'STATIC' actions. + ContentType *string `json:"contentType,omitempty"` + // Indicates whether the query part of the URI should be dropped and is valid only for 'REDIRECT' actions. Default value is 'FALSE', the redirect URI does not contain any query parameters. + DropQuery *bool `json:"dropQuery,omitempty"` + // The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. + Location *string `json:"location,omitempty"` + // The unique name of the Application Load Balancer HTTP rule. + Name *string `json:"name"` + // The response message of the request; this parameter is mandatory for 'STATIC' actions. + ResponseMessage *string `json:"responseMessage,omitempty"` + // The status code is for 'REDIRECT' and 'STATIC' actions only. If the HTTP rule is 'REDIRECT' the valid values are: 301, 302, 303, 307, 308; default value is '301'. If the HTTP rule is 'STATIC' the valid values are from the range 200-599; default value is '503'. + StatusCode *int32 `json:"statusCode,omitempty"` + // The ID of the target group; this parameter is mandatory and is valid only for 'FORWARD' actions. + TargetGroup *string `json:"targetGroup,omitempty"` + // The HTTP rule type. + Type *string `json:"type"` +} + +// NewApplicationLoadBalancerHttpRule instantiates a new ApplicationLoadBalancerHttpRule 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 NewApplicationLoadBalancerHttpRule(name string, type_ string) *ApplicationLoadBalancerHttpRule { + this := ApplicationLoadBalancerHttpRule{} + + this.Name = &name + this.Type = &type_ + + return &this +} + +// NewApplicationLoadBalancerHttpRuleWithDefaults instantiates a new ApplicationLoadBalancerHttpRule 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 NewApplicationLoadBalancerHttpRuleWithDefaults() *ApplicationLoadBalancerHttpRule { + this := ApplicationLoadBalancerHttpRule{} + return &this +} + +// GetConditions returns the Conditions field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetConditions() *[]ApplicationLoadBalancerHttpRuleCondition { + if o == nil { + return nil + } + + return o.Conditions + +} + +// GetConditionsOk returns a tuple with the Conditions field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetConditionsOk() (*[]ApplicationLoadBalancerHttpRuleCondition, bool) { + if o == nil { + return nil, false + } + + return o.Conditions, true +} + +// SetConditions sets field value +func (o *ApplicationLoadBalancerHttpRule) SetConditions(v []ApplicationLoadBalancerHttpRuleCondition) { + + o.Conditions = &v + +} + +// HasConditions returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasConditions() bool { + if o != nil && o.Conditions != nil { + return true + } + + return false +} + +// GetContentType returns the ContentType field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetContentType() *string { + if o == nil { + return nil + } + + return o.ContentType + +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.ContentType, true +} + +// SetContentType sets field value +func (o *ApplicationLoadBalancerHttpRule) SetContentType(v string) { + + o.ContentType = &v + +} + +// HasContentType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasContentType() bool { + if o != nil && o.ContentType != nil { + return true + } + + return false +} + +// GetDropQuery returns the DropQuery field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetDropQuery() *bool { + if o == nil { + return nil + } + + return o.DropQuery + +} + +// GetDropQueryOk returns a tuple with the DropQuery field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetDropQueryOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.DropQuery, true +} + +// SetDropQuery sets field value +func (o *ApplicationLoadBalancerHttpRule) SetDropQuery(v bool) { + + o.DropQuery = &v + +} + +// HasDropQuery returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasDropQuery() bool { + if o != nil && o.DropQuery != nil { + return true + } + + return false +} + +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetLocation() *string { + if o == nil { + return nil + } + + return o.Location + +} + +// GetLocationOk returns a tuple with the Location field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetLocationOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Location, true +} + +// SetLocation sets field value +func (o *ApplicationLoadBalancerHttpRule) SetLocation(v string) { + + o.Location = &v + +} + +// HasLocation returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasLocation() bool { + if o != nil && o.Location != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *ApplicationLoadBalancerHttpRule) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// GetResponseMessage returns the ResponseMessage field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetResponseMessage() *string { + if o == nil { + return nil + } + + return o.ResponseMessage + +} + +// GetResponseMessageOk returns a tuple with the ResponseMessage field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetResponseMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.ResponseMessage, true +} + +// SetResponseMessage sets field value +func (o *ApplicationLoadBalancerHttpRule) SetResponseMessage(v string) { + + o.ResponseMessage = &v + +} + +// HasResponseMessage returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasResponseMessage() bool { + if o != nil && o.ResponseMessage != nil { + return true + } + + return false +} + +// GetStatusCode returns the StatusCode field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetStatusCode() *int32 { + if o == nil { + return nil + } + + return o.StatusCode + +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetStatusCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.StatusCode, true +} + +// SetStatusCode sets field value +func (o *ApplicationLoadBalancerHttpRule) SetStatusCode(v int32) { + + o.StatusCode = &v + +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasStatusCode() bool { + if o != nil && o.StatusCode != nil { + return true + } + + return false +} + +// GetTargetGroup returns the TargetGroup field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetTargetGroup() *string { + if o == nil { + return nil + } + + return o.TargetGroup + +} + +// GetTargetGroupOk returns a tuple with the TargetGroup field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetTargetGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.TargetGroup, true +} + +// SetTargetGroup sets field value +func (o *ApplicationLoadBalancerHttpRule) SetTargetGroup(v string) { + + o.TargetGroup = &v + +} + +// HasTargetGroup returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasTargetGroup() bool { + if o != nil && o.TargetGroup != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRule) GetType() *string { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRule) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancerHttpRule) SetType(v string) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerHttpRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Conditions != nil { + toSerialize["conditions"] = o.Conditions + } + + if o.ContentType != nil { + toSerialize["contentType"] = o.ContentType + } + + if o.DropQuery != nil { + toSerialize["dropQuery"] = o.DropQuery + } + + if o.Location != nil { + toSerialize["location"] = o.Location + } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.ResponseMessage != nil { + toSerialize["responseMessage"] = o.ResponseMessage + } + + if o.StatusCode != nil { + toSerialize["statusCode"] = o.StatusCode + } + + if o.TargetGroup != nil { + toSerialize["targetGroup"] = o.TargetGroup + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerHttpRule struct { + value *ApplicationLoadBalancerHttpRule + isSet bool +} + +func (v NullableApplicationLoadBalancerHttpRule) Get() *ApplicationLoadBalancerHttpRule { + return v.value +} + +func (v *NullableApplicationLoadBalancerHttpRule) Set(val *ApplicationLoadBalancerHttpRule) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerHttpRule) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerHttpRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerHttpRule(val *ApplicationLoadBalancerHttpRule) *NullableApplicationLoadBalancerHttpRule { + return &NullableApplicationLoadBalancerHttpRule{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerHttpRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerHttpRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule_condition.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule_condition.go new file mode 100644 index 000000000000..a2b12adfd333 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_http_rule_condition.go @@ -0,0 +1,301 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerHttpRuleCondition struct for ApplicationLoadBalancerHttpRuleCondition +type ApplicationLoadBalancerHttpRuleCondition struct { + // The matching rule for the HTTP rule condition attribute; this parameter is mandatory for 'HEADER', 'PATH', 'QUERY', 'METHOD', 'HOST', and 'COOKIE' types. It must be 'null' if the type is 'SOURCE_IP'. + Condition *string `json:"condition"` + // The key can only be set when the HTTP rule condition type is 'COOKIES', 'HEADER', or 'QUERY'. For the type 'PATH', 'METHOD', 'HOST', or 'SOURCE_IP' the value must be 'null'. + Key *string `json:"key,omitempty"` + // Specifies whether the condition should be negated; the default value is 'FALSE'. + Negate *bool `json:"negate,omitempty"` + // The HTTP rule condition type. + Type *string `json:"type"` + // This parameter is mandatory for the conditions 'CONTAINS', 'EQUALS', 'MATCHES', 'STARTS_WITH', 'ENDS_WITH', or if the type is 'SOURCE_IP'. Specify a valid CIDR. If the condition is 'EXISTS', the value must be 'null'. + Value *string `json:"value,omitempty"` +} + +// NewApplicationLoadBalancerHttpRuleCondition instantiates a new ApplicationLoadBalancerHttpRuleCondition 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 NewApplicationLoadBalancerHttpRuleCondition(condition string, type_ string) *ApplicationLoadBalancerHttpRuleCondition { + this := ApplicationLoadBalancerHttpRuleCondition{} + + this.Condition = &condition + this.Type = &type_ + + return &this +} + +// NewApplicationLoadBalancerHttpRuleConditionWithDefaults instantiates a new ApplicationLoadBalancerHttpRuleCondition 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 NewApplicationLoadBalancerHttpRuleConditionWithDefaults() *ApplicationLoadBalancerHttpRuleCondition { + this := ApplicationLoadBalancerHttpRuleCondition{} + return &this +} + +// GetCondition returns the Condition field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetCondition() *string { + if o == nil { + return nil + } + + return o.Condition + +} + +// GetConditionOk returns a tuple with the Condition field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetConditionOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Condition, true +} + +// SetCondition sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetCondition(v string) { + + o.Condition = &v + +} + +// HasCondition returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasCondition() bool { + if o != nil && o.Condition != nil { + return true + } + + return false +} + +// GetKey returns the Key field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetKey() *string { + if o == nil { + return nil + } + + return o.Key + +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Key, true +} + +// SetKey sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetKey(v string) { + + o.Key = &v + +} + +// HasKey returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasKey() bool { + if o != nil && o.Key != nil { + return true + } + + return false +} + +// GetNegate returns the Negate field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetNegate() *bool { + if o == nil { + return nil + } + + return o.Negate + +} + +// GetNegateOk returns a tuple with the Negate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetNegateOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.Negate, true +} + +// SetNegate sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetNegate(v bool) { + + o.Negate = &v + +} + +// HasNegate returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasNegate() bool { + if o != nil && o.Negate != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetType() *string { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetType(v string) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// GetValue returns the Value field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetValue() *string { + if o == nil { + return nil + } + + return o.Value + +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerHttpRuleCondition) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Value, true +} + +// SetValue sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetValue(v string) { + + o.Value = &v + +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerHttpRuleCondition) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Condition != nil { + toSerialize["condition"] = o.Condition + } + + if o.Key != nil { + toSerialize["key"] = o.Key + } + + if o.Negate != nil { + toSerialize["negate"] = o.Negate + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + if o.Value != nil { + toSerialize["value"] = o.Value + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerHttpRuleCondition struct { + value *ApplicationLoadBalancerHttpRuleCondition + isSet bool +} + +func (v NullableApplicationLoadBalancerHttpRuleCondition) Get() *ApplicationLoadBalancerHttpRuleCondition { + return v.value +} + +func (v *NullableApplicationLoadBalancerHttpRuleCondition) Set(val *ApplicationLoadBalancerHttpRuleCondition) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerHttpRuleCondition) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerHttpRuleCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerHttpRuleCondition(val *ApplicationLoadBalancerHttpRuleCondition) *NullableApplicationLoadBalancerHttpRuleCondition { + return &NullableApplicationLoadBalancerHttpRuleCondition{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerHttpRuleCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerHttpRuleCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_properties.go new file mode 100644 index 000000000000..8c62ecc10318 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_properties.go @@ -0,0 +1,302 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerProperties struct for ApplicationLoadBalancerProperties +type ApplicationLoadBalancerProperties struct { + // Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers. + Ips *[]string `json:"ips,omitempty"` + // Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. + LbPrivateIps *[]string `json:"lbPrivateIps,omitempty"` + // The ID of the listening (inbound) LAN. + ListenerLan *int32 `json:"listenerLan"` + // The Application Load Balancer name. + Name *string `json:"name"` + // The ID of the balanced private target LAN (outbound). + TargetLan *int32 `json:"targetLan"` +} + +// NewApplicationLoadBalancerProperties instantiates a new ApplicationLoadBalancerProperties 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 NewApplicationLoadBalancerProperties(listenerLan int32, name string, targetLan int32) *ApplicationLoadBalancerProperties { + this := ApplicationLoadBalancerProperties{} + + this.ListenerLan = &listenerLan + this.Name = &name + this.TargetLan = &targetLan + + return &this +} + +// NewApplicationLoadBalancerPropertiesWithDefaults instantiates a new ApplicationLoadBalancerProperties 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 NewApplicationLoadBalancerPropertiesWithDefaults() *ApplicationLoadBalancerProperties { + this := ApplicationLoadBalancerProperties{} + return &this +} + +// GetIps returns the Ips field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerProperties) GetIps() *[]string { + if o == nil { + return nil + } + + return o.Ips + +} + +// GetIpsOk returns a tuple with the Ips field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerProperties) GetIpsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + + return o.Ips, true +} + +// SetIps sets field value +func (o *ApplicationLoadBalancerProperties) SetIps(v []string) { + + o.Ips = &v + +} + +// HasIps returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerProperties) HasIps() bool { + if o != nil && o.Ips != nil { + return true + } + + return false +} + +// GetLbPrivateIps returns the LbPrivateIps field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerProperties) GetLbPrivateIps() *[]string { + if o == nil { + return nil + } + + return o.LbPrivateIps + +} + +// GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + + return o.LbPrivateIps, true +} + +// SetLbPrivateIps sets field value +func (o *ApplicationLoadBalancerProperties) SetLbPrivateIps(v []string) { + + o.LbPrivateIps = &v + +} + +// HasLbPrivateIps returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerProperties) HasLbPrivateIps() bool { + if o != nil && o.LbPrivateIps != nil { + return true + } + + return false +} + +// GetListenerLan returns the ListenerLan field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerProperties) GetListenerLan() *int32 { + if o == nil { + return nil + } + + return o.ListenerLan + +} + +// GetListenerLanOk returns a tuple with the ListenerLan field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerProperties) GetListenerLanOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.ListenerLan, true +} + +// SetListenerLan sets field value +func (o *ApplicationLoadBalancerProperties) SetListenerLan(v int32) { + + o.ListenerLan = &v + +} + +// HasListenerLan returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerProperties) HasListenerLan() bool { + if o != nil && o.ListenerLan != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerProperties) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *ApplicationLoadBalancerProperties) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerProperties) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// GetTargetLan returns the TargetLan field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerProperties) GetTargetLan() *int32 { + if o == nil { + return nil + } + + return o.TargetLan + +} + +// GetTargetLanOk returns a tuple with the TargetLan field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerProperties) GetTargetLanOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.TargetLan, true +} + +// SetTargetLan sets field value +func (o *ApplicationLoadBalancerProperties) SetTargetLan(v int32) { + + o.TargetLan = &v + +} + +// HasTargetLan returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerProperties) HasTargetLan() bool { + if o != nil && o.TargetLan != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Ips != nil { + toSerialize["ips"] = o.Ips + } + + if o.LbPrivateIps != nil { + toSerialize["lbPrivateIps"] = o.LbPrivateIps + } + + if o.ListenerLan != nil { + toSerialize["listenerLan"] = o.ListenerLan + } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.TargetLan != nil { + toSerialize["targetLan"] = o.TargetLan + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerProperties struct { + value *ApplicationLoadBalancerProperties + isSet bool +} + +func (v NullableApplicationLoadBalancerProperties) Get() *ApplicationLoadBalancerProperties { + return v.value +} + +func (v *NullableApplicationLoadBalancerProperties) Set(val *ApplicationLoadBalancerProperties) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerProperties(val *ApplicationLoadBalancerProperties) *NullableApplicationLoadBalancerProperties { + return &NullableApplicationLoadBalancerProperties{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_put.go new file mode 100644 index 000000000000..79a5fa1c7087 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancer_put.go @@ -0,0 +1,255 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancerPut struct for ApplicationLoadBalancerPut +type ApplicationLoadBalancerPut struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + Properties *ApplicationLoadBalancerProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewApplicationLoadBalancerPut instantiates a new ApplicationLoadBalancerPut 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 NewApplicationLoadBalancerPut(properties ApplicationLoadBalancerProperties) *ApplicationLoadBalancerPut { + this := ApplicationLoadBalancerPut{} + + this.Properties = &properties + + return &this +} + +// NewApplicationLoadBalancerPutWithDefaults instantiates a new ApplicationLoadBalancerPut 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 NewApplicationLoadBalancerPutWithDefaults() *ApplicationLoadBalancerPut { + this := ApplicationLoadBalancerPut{} + return &this +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerPut) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerPut) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *ApplicationLoadBalancerPut) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerPut) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerPut) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerPut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *ApplicationLoadBalancerPut) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerPut) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerPut) GetProperties() *ApplicationLoadBalancerProperties { + if o == nil { + return nil + } + + return o.Properties + +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerPut) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool) { + if o == nil { + return nil, false + } + + return o.Properties, true +} + +// SetProperties sets field value +func (o *ApplicationLoadBalancerPut) SetProperties(v ApplicationLoadBalancerProperties) { + + o.Properties = &v + +} + +// HasProperties returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerPut) HasProperties() bool { + if o != nil && o.Properties != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancerPut) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancerPut) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancerPut) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerPut) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancerPut) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Properties != nil { + toSerialize["properties"] = o.Properties + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancerPut struct { + value *ApplicationLoadBalancerPut + isSet bool +} + +func (v NullableApplicationLoadBalancerPut) Get() *ApplicationLoadBalancerPut { + return v.value +} + +func (v *NullableApplicationLoadBalancerPut) Set(val *ApplicationLoadBalancerPut) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancerPut) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancerPut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancerPut(val *ApplicationLoadBalancerPut) *NullableApplicationLoadBalancerPut { + return &NullableApplicationLoadBalancerPut{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancerPut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancerPut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancers.go new file mode 100644 index 000000000000..a2f3a9e04c13 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_application_load_balancers.go @@ -0,0 +1,385 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// ApplicationLoadBalancers struct for ApplicationLoadBalancers +type ApplicationLoadBalancers struct { + Links *PaginationLinks `json:"_links,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + // Array of items in the collection. + Items *[]ApplicationLoadBalancer `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` + // The offset (if specified in the request). + Offset *float32 `json:"offset,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewApplicationLoadBalancers instantiates a new ApplicationLoadBalancers 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 NewApplicationLoadBalancers() *ApplicationLoadBalancers { + this := ApplicationLoadBalancers{} + + return &this +} + +// NewApplicationLoadBalancersWithDefaults instantiates a new ApplicationLoadBalancers 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 NewApplicationLoadBalancersWithDefaults() *ApplicationLoadBalancers { + this := ApplicationLoadBalancers{} + return &this +} + +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetLinks() *PaginationLinks { + if o == nil { + return nil + } + + return o.Links + +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { + if o == nil { + return nil, false + } + + return o.Links, true +} + +// SetLinks sets field value +func (o *ApplicationLoadBalancers) SetLinks(v PaginationLinks) { + + o.Links = &v + +} + +// HasLinks returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasLinks() bool { + if o != nil && o.Links != nil { + return true + } + + return false +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *ApplicationLoadBalancers) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *ApplicationLoadBalancers) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetItems() *[]ApplicationLoadBalancer { + if o == nil { + return nil + } + + return o.Items + +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetItemsOk() (*[]ApplicationLoadBalancer, bool) { + if o == nil { + return nil, false + } + + return o.Items, true +} + +// SetItems sets field value +func (o *ApplicationLoadBalancers) SetItems(v []ApplicationLoadBalancer) { + + o.Items = &v + +} + +// HasItems returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetLimit() *float32 { + if o == nil { + return nil + } + + return o.Limit + +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetLimitOk() (*float32, bool) { + if o == nil { + return nil, false + } + + return o.Limit, true +} + +// SetLimit sets field value +func (o *ApplicationLoadBalancers) SetLimit(v float32) { + + o.Limit = &v + +} + +// HasLimit returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasLimit() bool { + if o != nil && o.Limit != nil { + return true + } + + return false +} + +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetOffset() *float32 { + if o == nil { + return nil + } + + return o.Offset + +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetOffsetOk() (*float32, bool) { + if o == nil { + return nil, false + } + + return o.Offset, true +} + +// SetOffset sets field value +func (o *ApplicationLoadBalancers) SetOffset(v float32) { + + o.Offset = &v + +} + +// HasOffset returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ApplicationLoadBalancers) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationLoadBalancers) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *ApplicationLoadBalancers) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o ApplicationLoadBalancers) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Links != nil { + toSerialize["_links"] = o.Links + } + + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Items != nil { + toSerialize["items"] = o.Items + } + + if o.Limit != nil { + toSerialize["limit"] = o.Limit + } + + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableApplicationLoadBalancers struct { + value *ApplicationLoadBalancers + isSet bool +} + +func (v NullableApplicationLoadBalancers) Get() *ApplicationLoadBalancers { + return v.value +} + +func (v *NullableApplicationLoadBalancers) Set(val *ApplicationLoadBalancers) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationLoadBalancers) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationLoadBalancers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationLoadBalancers(val *ApplicationLoadBalancers) *NullableApplicationLoadBalancers { + return &NullableApplicationLoadBalancers{value: val, isSet: true} +} + +func (v NullableApplicationLoadBalancers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationLoadBalancers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_attached_volumes.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_attached_volumes.go index ed03aea6907f..fdd81e425515 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_attached_volumes.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_attached_volumes.go @@ -16,19 +16,19 @@ import ( // AttachedVolumes struct for AttachedVolumes type AttachedVolumes struct { + Links *PaginationLinks `json:"_links,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Volume `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewAttachedVolumes instantiates a new AttachedVolumes object @@ -49,114 +49,114 @@ func NewAttachedVolumesWithDefaults() *AttachedVolumes { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *AttachedVolumes) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *AttachedVolumes) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AttachedVolumes) GetIdOk() (*string, bool) { +func (o *AttachedVolumes) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *AttachedVolumes) SetId(v string) { +// SetLinks sets field value +func (o *AttachedVolumes) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *AttachedVolumes) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *AttachedVolumes) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *AttachedVolumes) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *AttachedVolumes) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AttachedVolumes) GetTypeOk() (*Type, bool) { +func (o *AttachedVolumes) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *AttachedVolumes) SetType(v Type) { +// SetHref sets field value +func (o *AttachedVolumes) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *AttachedVolumes) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *AttachedVolumes) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *AttachedVolumes) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *AttachedVolumes) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AttachedVolumes) GetHrefOk() (*string, bool) { +func (o *AttachedVolumes) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *AttachedVolumes) SetHref(v string) { +// SetId sets field value +func (o *AttachedVolumes) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *AttachedVolumes) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *AttachedVolumes) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *AttachedVolumes) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Volume will be returned +// If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetItems() *[]Volume { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *AttachedVolumes) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *AttachedVolumes) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *AttachedVolumes) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AttachedVolumes) GetOffsetOk() (*float32, bool) { +func (o *AttachedVolumes) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *AttachedVolumes) SetOffset(v float32) { +// SetLimit sets field value +func (o *AttachedVolumes) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *AttachedVolumes) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *AttachedVolumes) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *AttachedVolumes) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *AttachedVolumes) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AttachedVolumes) GetLimitOk() (*float32, bool) { +func (o *AttachedVolumes) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *AttachedVolumes) SetLimit(v float32) { +// SetOffset sets field value +func (o *AttachedVolumes) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *AttachedVolumes) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *AttachedVolumes) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *AttachedVolumes) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *AttachedVolumes) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AttachedVolumes) GetLinksOk() (*PaginationLinks, bool) { +func (o *AttachedVolumes) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *AttachedVolumes) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *AttachedVolumes) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *AttachedVolumes) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *AttachedVolumes) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *AttachedVolumes) HasLinks() bool { func (o AttachedVolumes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit.go index bc9197db9535..6f1ff7c47461 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit.go @@ -16,14 +16,14 @@ import ( // BackupUnit struct for BackupUnit type BackupUnit struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *BackupUnitProperties `json:"properties"` + // The type of object that has been created. + Type *string `json:"type,omitempty"` } // NewBackupUnit instantiates a new BackupUnit object @@ -46,190 +46,190 @@ func NewBackupUnitWithDefaults() *BackupUnit { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnit) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *BackupUnit) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnit) GetIdOk() (*string, bool) { +func (o *BackupUnit) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *BackupUnit) SetId(v string) { +// SetHref sets field value +func (o *BackupUnit) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *BackupUnit) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *BackupUnit) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnit) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *BackupUnit) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnit) GetTypeOk() (*string, bool) { +func (o *BackupUnit) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *BackupUnit) SetType(v string) { +// SetId sets field value +func (o *BackupUnit) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *BackupUnit) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *BackupUnit) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnit) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *BackupUnit) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnit) GetHrefOk() (*string, bool) { +func (o *BackupUnit) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *BackupUnit) SetHref(v string) { +// SetMetadata sets field value +func (o *BackupUnit) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *BackupUnit) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *BackupUnit) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *BackupUnit) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *BackupUnit) GetProperties() *BackupUnitProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnit) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *BackupUnit) GetPropertiesOk() (*BackupUnitProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *BackupUnit) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *BackupUnit) SetProperties(v BackupUnitProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *BackupUnit) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *BackupUnit) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for BackupUnitProperties will be returned -func (o *BackupUnit) GetProperties() *BackupUnitProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *BackupUnit) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnit) GetPropertiesOk() (*BackupUnitProperties, bool) { +func (o *BackupUnit) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *BackupUnit) SetProperties(v BackupUnitProperties) { +// SetType sets field value +func (o *BackupUnit) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *BackupUnit) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *BackupUnit) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *BackupUnit) HasProperties() bool { func (o BackupUnit) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_properties.go index 45b5584e28ba..64698d35608d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_properties.go @@ -16,12 +16,12 @@ import ( // BackupUnitProperties struct for BackupUnitProperties type BackupUnitProperties struct { + // The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. + Email *string `json:"email,omitempty"` // The name of the resource (alphanumeric characters only). Name *string `json:"name"` // The password associated with that resource. Password *string `json:"password,omitempty"` - // The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. - Email *string `json:"email,omitempty"` } // NewBackupUnitProperties instantiates a new BackupUnitProperties object @@ -44,114 +44,114 @@ func NewBackupUnitPropertiesWithDefaults() *BackupUnitProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnitProperties) GetName() *string { +// GetEmail returns the Email field value +// If the value is explicit nil, nil is returned +func (o *BackupUnitProperties) GetEmail() *string { if o == nil { return nil } - return o.Name + return o.Email } -// GetNameOk returns a tuple with the Name field value +// GetEmailOk returns a tuple with the Email field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnitProperties) GetNameOk() (*string, bool) { +func (o *BackupUnitProperties) GetEmailOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Email, true } -// SetName sets field value -func (o *BackupUnitProperties) SetName(v string) { +// SetEmail sets field value +func (o *BackupUnitProperties) SetEmail(v string) { - o.Name = &v + o.Email = &v } -// HasName returns a boolean if a field has been set. -func (o *BackupUnitProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasEmail returns a boolean if a field has been set. +func (o *BackupUnitProperties) HasEmail() bool { + if o != nil && o.Email != nil { return true } return false } -// GetPassword returns the Password field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnitProperties) GetPassword() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *BackupUnitProperties) GetName() *string { if o == nil { return nil } - return o.Password + return o.Name } -// GetPasswordOk returns a tuple with the Password field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnitProperties) GetPasswordOk() (*string, bool) { +func (o *BackupUnitProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Password, true + return o.Name, true } -// SetPassword sets field value -func (o *BackupUnitProperties) SetPassword(v string) { +// SetName sets field value +func (o *BackupUnitProperties) SetName(v string) { - o.Password = &v + o.Name = &v } -// HasPassword returns a boolean if a field has been set. -func (o *BackupUnitProperties) HasPassword() bool { - if o != nil && o.Password != nil { +// HasName returns a boolean if a field has been set. +func (o *BackupUnitProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetEmail returns the Email field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnitProperties) GetEmail() *string { +// GetPassword returns the Password field value +// If the value is explicit nil, nil is returned +func (o *BackupUnitProperties) GetPassword() *string { if o == nil { return nil } - return o.Email + return o.Password } -// GetEmailOk returns a tuple with the Email field value +// GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnitProperties) GetEmailOk() (*string, bool) { +func (o *BackupUnitProperties) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } - return o.Email, true + return o.Password, true } -// SetEmail sets field value -func (o *BackupUnitProperties) SetEmail(v string) { +// SetPassword sets field value +func (o *BackupUnitProperties) SetPassword(v string) { - o.Email = &v + o.Password = &v } -// HasEmail returns a boolean if a field has been set. -func (o *BackupUnitProperties) HasEmail() bool { - if o != nil && o.Email != nil { +// HasPassword returns a boolean if a field has been set. +func (o *BackupUnitProperties) HasPassword() bool { + if o != nil && o.Password != nil { return true } @@ -160,15 +160,18 @@ func (o *BackupUnitProperties) HasEmail() bool { func (o BackupUnitProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.Name != nil { toSerialize["name"] = o.Name } + if o.Password != nil { toSerialize["password"] = o.Password } - if o.Email != nil { - toSerialize["email"] = o.Email - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_sso.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_sso.go index f493bf950c8d..ea6ba4159b5b 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_sso.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_unit_sso.go @@ -39,7 +39,7 @@ func NewBackupUnitSSOWithDefaults() *BackupUnitSSO { } // GetSsoUrl returns the SsoUrl field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *BackupUnitSSO) GetSsoUrl() *string { if o == nil { return nil @@ -81,6 +81,7 @@ func (o BackupUnitSSO) MarshalJSON() ([]byte, error) { if o.SsoUrl != nil { toSerialize["ssoUrl"] = o.SsoUrl } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_units.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_units.go index 6023f94e15ab..280d50c61107 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_units.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_backup_units.go @@ -16,14 +16,14 @@ import ( // BackupUnits struct for BackupUnits type BackupUnits struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]BackupUnit `json:"items,omitempty"` + // The type of object that has been created. + Type *string `json:"type,omitempty"` } // NewBackupUnits instantiates a new BackupUnits object @@ -44,152 +44,152 @@ func NewBackupUnitsWithDefaults() *BackupUnits { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnits) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *BackupUnits) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnits) GetIdOk() (*string, bool) { +func (o *BackupUnits) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *BackupUnits) SetId(v string) { +// SetHref sets field value +func (o *BackupUnits) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *BackupUnits) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *BackupUnits) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnits) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *BackupUnits) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnits) GetTypeOk() (*string, bool) { +func (o *BackupUnits) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *BackupUnits) SetType(v string) { +// SetId sets field value +func (o *BackupUnits) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *BackupUnits) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *BackupUnits) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BackupUnits) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *BackupUnits) GetItems() *[]BackupUnit { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnits) GetHrefOk() (*string, bool) { +func (o *BackupUnits) GetItemsOk() (*[]BackupUnit, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *BackupUnits) SetHref(v string) { +// SetItems sets field value +func (o *BackupUnits) SetItems(v []BackupUnit) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *BackupUnits) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *BackupUnits) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []BackupUnit will be returned -func (o *BackupUnits) GetItems() *[]BackupUnit { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *BackupUnits) GetType() *string { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BackupUnits) GetItemsOk() (*[]BackupUnit, bool) { +func (o *BackupUnits) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *BackupUnits) SetItems(v []BackupUnit) { +// SetType sets field value +func (o *BackupUnits) SetType(v string) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *BackupUnits) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *BackupUnits) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *BackupUnits) HasItems() bool { func (o BackupUnits) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_balanced_nics.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_balanced_nics.go index feef17f6267c..f9338b5784a4 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_balanced_nics.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_balanced_nics.go @@ -16,19 +16,19 @@ import ( // BalancedNics struct for BalancedNics type BalancedNics struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Nic `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewBalancedNics instantiates a new BalancedNics object @@ -49,114 +49,114 @@ func NewBalancedNicsWithDefaults() *BalancedNics { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BalancedNics) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *BalancedNics) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BalancedNics) GetIdOk() (*string, bool) { +func (o *BalancedNics) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *BalancedNics) SetId(v string) { +// SetLinks sets field value +func (o *BalancedNics) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *BalancedNics) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *BalancedNics) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *BalancedNics) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *BalancedNics) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BalancedNics) GetTypeOk() (*Type, bool) { +func (o *BalancedNics) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *BalancedNics) SetType(v Type) { +// SetHref sets field value +func (o *BalancedNics) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *BalancedNics) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *BalancedNics) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *BalancedNics) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *BalancedNics) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BalancedNics) GetHrefOk() (*string, bool) { +func (o *BalancedNics) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *BalancedNics) SetHref(v string) { +// SetId sets field value +func (o *BalancedNics) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *BalancedNics) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *BalancedNics) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *BalancedNics) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Nic will be returned +// If the value is explicit nil, nil is returned func (o *BalancedNics) GetItems() *[]Nic { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *BalancedNics) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *BalancedNics) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *BalancedNics) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BalancedNics) GetOffsetOk() (*float32, bool) { +func (o *BalancedNics) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *BalancedNics) SetOffset(v float32) { +// SetLimit sets field value +func (o *BalancedNics) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *BalancedNics) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *BalancedNics) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *BalancedNics) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *BalancedNics) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BalancedNics) GetLimitOk() (*float32, bool) { +func (o *BalancedNics) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *BalancedNics) SetLimit(v float32) { +// SetOffset sets field value +func (o *BalancedNics) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *BalancedNics) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *BalancedNics) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *BalancedNics) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *BalancedNics) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *BalancedNics) GetLinksOk() (*PaginationLinks, bool) { +func (o *BalancedNics) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *BalancedNics) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *BalancedNics) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *BalancedNics) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *BalancedNics) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *BalancedNics) HasLinks() bool { func (o BalancedNics) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cdroms.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cdroms.go index 4d2bb9a85364..86289fa1deb8 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cdroms.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cdroms.go @@ -16,19 +16,19 @@ import ( // Cdroms struct for Cdroms type Cdroms struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Image `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewCdroms instantiates a new Cdroms object @@ -49,114 +49,114 @@ func NewCdromsWithDefaults() *Cdroms { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Cdroms) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Cdroms) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Cdroms) GetIdOk() (*string, bool) { +func (o *Cdroms) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Cdroms) SetId(v string) { +// SetLinks sets field value +func (o *Cdroms) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Cdroms) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Cdroms) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Cdroms) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Cdroms) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Cdroms) GetTypeOk() (*Type, bool) { +func (o *Cdroms) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Cdroms) SetType(v Type) { +// SetHref sets field value +func (o *Cdroms) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Cdroms) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Cdroms) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Cdroms) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Cdroms) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Cdroms) GetHrefOk() (*string, bool) { +func (o *Cdroms) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Cdroms) SetHref(v string) { +// SetId sets field value +func (o *Cdroms) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Cdroms) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Cdroms) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Cdroms) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Image will be returned +// If the value is explicit nil, nil is returned func (o *Cdroms) GetItems() *[]Image { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Cdroms) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Cdroms) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Cdroms) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Cdroms) GetOffsetOk() (*float32, bool) { +func (o *Cdroms) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Cdroms) SetOffset(v float32) { +// SetLimit sets field value +func (o *Cdroms) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Cdroms) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Cdroms) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Cdroms) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Cdroms) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Cdroms) GetLimitOk() (*float32, bool) { +func (o *Cdroms) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Cdroms) SetLimit(v float32) { +// SetOffset sets field value +func (o *Cdroms) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Cdroms) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Cdroms) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Cdroms) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Cdroms) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Cdroms) GetLinksOk() (*PaginationLinks, bool) { +func (o *Cdroms) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Cdroms) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Cdroms) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Cdroms) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Cdroms) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Cdroms) HasLinks() bool { func (o Cdroms) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_connectable_datacenter.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_connectable_datacenter.go index 6b8a5f4cd818..778a5bdd0979 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_connectable_datacenter.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_connectable_datacenter.go @@ -17,8 +17,8 @@ import ( // ConnectableDatacenter struct for ConnectableDatacenter type ConnectableDatacenter struct { Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` } // NewConnectableDatacenter instantiates a new ConnectableDatacenter object @@ -40,7 +40,7 @@ func NewConnectableDatacenterWithDefaults() *ConnectableDatacenter { } // GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *ConnectableDatacenter) GetId() *string { if o == nil { return nil @@ -77,76 +77,76 @@ func (o *ConnectableDatacenter) HasId() bool { return false } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ConnectableDatacenter) GetName() *string { +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *ConnectableDatacenter) GetLocation() *string { if o == nil { return nil } - return o.Name + return o.Location } -// GetNameOk returns a tuple with the Name field value +// GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ConnectableDatacenter) GetNameOk() (*string, bool) { +func (o *ConnectableDatacenter) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Location, true } -// SetName sets field value -func (o *ConnectableDatacenter) SetName(v string) { +// SetLocation sets field value +func (o *ConnectableDatacenter) SetLocation(v string) { - o.Name = &v + o.Location = &v } -// HasName returns a boolean if a field has been set. -func (o *ConnectableDatacenter) HasName() bool { - if o != nil && o.Name != nil { +// HasLocation returns a boolean if a field has been set. +func (o *ConnectableDatacenter) HasLocation() bool { + if o != nil && o.Location != nil { return true } return false } -// GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ConnectableDatacenter) GetLocation() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *ConnectableDatacenter) GetName() *string { if o == nil { return nil } - return o.Location + return o.Name } -// GetLocationOk returns a tuple with the Location field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ConnectableDatacenter) GetLocationOk() (*string, bool) { +func (o *ConnectableDatacenter) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Location, true + return o.Name, true } -// SetLocation sets field value -func (o *ConnectableDatacenter) SetLocation(v string) { +// SetName sets field value +func (o *ConnectableDatacenter) SetName(v string) { - o.Location = &v + o.Name = &v } -// HasLocation returns a boolean if a field has been set. -func (o *ConnectableDatacenter) HasLocation() bool { - if o != nil && o.Location != nil { +// HasName returns a boolean if a field has been set. +func (o *ConnectableDatacenter) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -158,12 +158,15 @@ func (o ConnectableDatacenter) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if o.Name != nil { - toSerialize["name"] = o.Name - } + if o.Location != nil { toSerialize["location"] = o.Location } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract.go index e1e05792e978..d3ce413e1913 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract.go @@ -16,9 +16,9 @@ import ( // Contract struct for Contract type Contract struct { - // The type of the resource. - Type *Type `json:"type,omitempty"` Properties *ContractProperties `json:"properties"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewContract instantiates a new Contract object @@ -41,76 +41,76 @@ func NewContractWithDefaults() *Contract { return &this } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Contract) GetType() *Type { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Contract) GetProperties() *ContractProperties { if o == nil { return nil } - return o.Type + return o.Properties } -// GetTypeOk returns a tuple with the Type field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Contract) GetTypeOk() (*Type, bool) { +func (o *Contract) GetPropertiesOk() (*ContractProperties, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Properties, true } -// SetType sets field value -func (o *Contract) SetType(v Type) { +// SetProperties sets field value +func (o *Contract) SetProperties(v ContractProperties) { - o.Type = &v + o.Properties = &v } -// HasType returns a boolean if a field has been set. -func (o *Contract) HasType() bool { - if o != nil && o.Type != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Contract) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ContractProperties will be returned -func (o *Contract) GetProperties() *ContractProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Contract) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Contract) GetPropertiesOk() (*ContractProperties, bool) { +func (o *Contract) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Contract) SetProperties(v ContractProperties) { +// SetType sets field value +func (o *Contract) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Contract) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Contract) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -119,12 +119,14 @@ func (o *Contract) HasProperties() bool { func (o Contract) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract_properties.go index a888e074f158..a579ea3b7897 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contract_properties.go @@ -18,13 +18,13 @@ import ( type ContractProperties struct { // The contract number. ContractNumber *int64 `json:"contractNumber,omitempty"` - // The owner of the contract. + // The contract owner's user name. Owner *string `json:"owner,omitempty"` - // The status of the contract. - Status *string `json:"status,omitempty"` // The registration domain of the contract. RegDomain *string `json:"regDomain,omitempty"` ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"` + // The contract status. + Status *string `json:"status,omitempty"` } // NewContractProperties instantiates a new ContractProperties object @@ -46,7 +46,7 @@ func NewContractPropertiesWithDefaults() *ContractProperties { } // GetContractNumber returns the ContractNumber field value -// If the value is explicit nil, the zero value for int64 will be returned +// If the value is explicit nil, nil is returned func (o *ContractProperties) GetContractNumber() *int64 { if o == nil { return nil @@ -84,7 +84,7 @@ func (o *ContractProperties) HasContractNumber() bool { } // GetOwner returns the Owner field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *ContractProperties) GetOwner() *string { if o == nil { return nil @@ -121,114 +121,114 @@ func (o *ContractProperties) HasOwner() bool { return false } -// GetStatus returns the Status field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ContractProperties) GetStatus() *string { +// GetRegDomain returns the RegDomain field value +// If the value is explicit nil, nil is returned +func (o *ContractProperties) GetRegDomain() *string { if o == nil { return nil } - return o.Status + return o.RegDomain } -// GetStatusOk returns a tuple with the Status field value +// GetRegDomainOk returns a tuple with the RegDomain field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ContractProperties) GetStatusOk() (*string, bool) { +func (o *ContractProperties) GetRegDomainOk() (*string, bool) { if o == nil { return nil, false } - return o.Status, true + return o.RegDomain, true } -// SetStatus sets field value -func (o *ContractProperties) SetStatus(v string) { +// SetRegDomain sets field value +func (o *ContractProperties) SetRegDomain(v string) { - o.Status = &v + o.RegDomain = &v } -// HasStatus returns a boolean if a field has been set. -func (o *ContractProperties) HasStatus() bool { - if o != nil && o.Status != nil { +// HasRegDomain returns a boolean if a field has been set. +func (o *ContractProperties) HasRegDomain() bool { + if o != nil && o.RegDomain != nil { return true } return false } -// GetRegDomain returns the RegDomain field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ContractProperties) GetRegDomain() *string { +// GetResourceLimits returns the ResourceLimits field value +// If the value is explicit nil, nil is returned +func (o *ContractProperties) GetResourceLimits() *ResourceLimits { if o == nil { return nil } - return o.RegDomain + return o.ResourceLimits } -// GetRegDomainOk returns a tuple with the RegDomain field value +// GetResourceLimitsOk returns a tuple with the ResourceLimits field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ContractProperties) GetRegDomainOk() (*string, bool) { +func (o *ContractProperties) GetResourceLimitsOk() (*ResourceLimits, bool) { if o == nil { return nil, false } - return o.RegDomain, true + return o.ResourceLimits, true } -// SetRegDomain sets field value -func (o *ContractProperties) SetRegDomain(v string) { +// SetResourceLimits sets field value +func (o *ContractProperties) SetResourceLimits(v ResourceLimits) { - o.RegDomain = &v + o.ResourceLimits = &v } -// HasRegDomain returns a boolean if a field has been set. -func (o *ContractProperties) HasRegDomain() bool { - if o != nil && o.RegDomain != nil { +// HasResourceLimits returns a boolean if a field has been set. +func (o *ContractProperties) HasResourceLimits() bool { + if o != nil && o.ResourceLimits != nil { return true } return false } -// GetResourceLimits returns the ResourceLimits field value -// If the value is explicit nil, the zero value for ResourceLimits will be returned -func (o *ContractProperties) GetResourceLimits() *ResourceLimits { +// GetStatus returns the Status field value +// If the value is explicit nil, nil is returned +func (o *ContractProperties) GetStatus() *string { if o == nil { return nil } - return o.ResourceLimits + return o.Status } -// GetResourceLimitsOk returns a tuple with the ResourceLimits field value +// GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ContractProperties) GetResourceLimitsOk() (*ResourceLimits, bool) { +func (o *ContractProperties) GetStatusOk() (*string, bool) { if o == nil { return nil, false } - return o.ResourceLimits, true + return o.Status, true } -// SetResourceLimits sets field value -func (o *ContractProperties) SetResourceLimits(v ResourceLimits) { +// SetStatus sets field value +func (o *ContractProperties) SetStatus(v string) { - o.ResourceLimits = &v + o.Status = &v } -// HasResourceLimits returns a boolean if a field has been set. -func (o *ContractProperties) HasResourceLimits() bool { - if o != nil && o.ResourceLimits != nil { +// HasStatus returns a boolean if a field has been set. +func (o *ContractProperties) HasStatus() bool { + if o != nil && o.Status != nil { return true } @@ -240,18 +240,23 @@ func (o ContractProperties) MarshalJSON() ([]byte, error) { if o.ContractNumber != nil { toSerialize["contractNumber"] = o.ContractNumber } + if o.Owner != nil { toSerialize["owner"] = o.Owner } - if o.Status != nil { - toSerialize["status"] = o.Status - } + if o.RegDomain != nil { toSerialize["regDomain"] = o.RegDomain } + if o.ResourceLimits != nil { toSerialize["resourceLimits"] = o.ResourceLimits } + + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contracts.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contracts.go index 5695f722762f..61e2f9aa9618 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contracts.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_contracts.go @@ -16,14 +16,14 @@ import ( // Contracts struct for Contracts type Contracts struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Contract `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewContracts instantiates a new Contracts object @@ -44,152 +44,152 @@ func NewContractsWithDefaults() *Contracts { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Contracts) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Contracts) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Contracts) GetIdOk() (*string, bool) { +func (o *Contracts) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Contracts) SetId(v string) { +// SetHref sets field value +func (o *Contracts) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Contracts) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Contracts) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Contracts) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Contracts) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Contracts) GetTypeOk() (*Type, bool) { +func (o *Contracts) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Contracts) SetType(v Type) { +// SetId sets field value +func (o *Contracts) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Contracts) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Contracts) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Contracts) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Contracts) GetItems() *[]Contract { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Contracts) GetHrefOk() (*string, bool) { +func (o *Contracts) GetItemsOk() (*[]Contract, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Contracts) SetHref(v string) { +// SetItems sets field value +func (o *Contracts) SetItems(v []Contract) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Contracts) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Contracts) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Contract will be returned -func (o *Contracts) GetItems() *[]Contract { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Contracts) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Contracts) GetItemsOk() (*[]Contract, bool) { +func (o *Contracts) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Contracts) SetItems(v []Contract) { +// SetType sets field value +func (o *Contracts) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Contracts) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Contracts) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Contracts) HasItems() bool { func (o Contracts) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cpu_architecture_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cpu_architecture_properties.go index 80c6b6c24114..c86a3899dea3 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cpu_architecture_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_cpu_architecture_properties.go @@ -45,7 +45,7 @@ func NewCpuArchitecturePropertiesWithDefaults() *CpuArchitectureProperties { } // GetCpuFamily returns the CpuFamily field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetCpuFamily() *string { if o == nil { return nil @@ -83,7 +83,7 @@ func (o *CpuArchitectureProperties) HasCpuFamily() bool { } // GetMaxCores returns the MaxCores field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetMaxCores() *int32 { if o == nil { return nil @@ -121,7 +121,7 @@ func (o *CpuArchitectureProperties) HasMaxCores() bool { } // GetMaxRam returns the MaxRam field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetMaxRam() *int32 { if o == nil { return nil @@ -159,7 +159,7 @@ func (o *CpuArchitectureProperties) HasMaxRam() bool { } // GetVendor returns the Vendor field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetVendor() *string { if o == nil { return nil @@ -201,15 +201,19 @@ func (o CpuArchitectureProperties) MarshalJSON() ([]byte, error) { if o.CpuFamily != nil { toSerialize["cpuFamily"] = o.CpuFamily } + if o.MaxCores != nil { toSerialize["maxCores"] = o.MaxCores } + if o.MaxRam != nil { toSerialize["maxRam"] = o.MaxRam } + if o.Vendor != nil { toSerialize["vendor"] = o.Vendor } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_data_center_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_data_center_entities.go index 65fa3ee3d1db..2ac821f85daa 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_data_center_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_data_center_entities.go @@ -16,12 +16,12 @@ import ( // DataCenterEntities struct for DataCenterEntities type DataCenterEntities struct { - Servers *Servers `json:"servers,omitempty"` - Volumes *Volumes `json:"volumes,omitempty"` - Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"` Lans *Lans `json:"lans,omitempty"` - Networkloadbalancers *NetworkLoadBalancers `json:"networkloadbalancers,omitempty"` + Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"` Natgateways *NatGateways `json:"natgateways,omitempty"` + Networkloadbalancers *NetworkLoadBalancers `json:"networkloadbalancers,omitempty"` + Servers *Servers `json:"servers,omitempty"` + Volumes *Volumes `json:"volumes,omitempty"` } // NewDataCenterEntities instantiates a new DataCenterEntities object @@ -42,228 +42,228 @@ func NewDataCenterEntitiesWithDefaults() *DataCenterEntities { return &this } -// GetServers returns the Servers field value -// If the value is explicit nil, the zero value for Servers will be returned -func (o *DataCenterEntities) GetServers() *Servers { +// GetLans returns the Lans field value +// If the value is explicit nil, nil is returned +func (o *DataCenterEntities) GetLans() *Lans { if o == nil { return nil } - return o.Servers + return o.Lans } -// GetServersOk returns a tuple with the Servers field value +// GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DataCenterEntities) GetServersOk() (*Servers, bool) { +func (o *DataCenterEntities) GetLansOk() (*Lans, bool) { if o == nil { return nil, false } - return o.Servers, true + return o.Lans, true } -// SetServers sets field value -func (o *DataCenterEntities) SetServers(v Servers) { +// SetLans sets field value +func (o *DataCenterEntities) SetLans(v Lans) { - o.Servers = &v + o.Lans = &v } -// HasServers returns a boolean if a field has been set. -func (o *DataCenterEntities) HasServers() bool { - if o != nil && o.Servers != nil { +// HasLans returns a boolean if a field has been set. +func (o *DataCenterEntities) HasLans() bool { + if o != nil && o.Lans != nil { return true } return false } -// GetVolumes returns the Volumes field value -// If the value is explicit nil, the zero value for Volumes will be returned -func (o *DataCenterEntities) GetVolumes() *Volumes { +// GetLoadbalancers returns the Loadbalancers field value +// If the value is explicit nil, nil is returned +func (o *DataCenterEntities) GetLoadbalancers() *Loadbalancers { if o == nil { return nil } - return o.Volumes + return o.Loadbalancers } -// GetVolumesOk returns a tuple with the Volumes field value +// GetLoadbalancersOk returns a tuple with the Loadbalancers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DataCenterEntities) GetVolumesOk() (*Volumes, bool) { +func (o *DataCenterEntities) GetLoadbalancersOk() (*Loadbalancers, bool) { if o == nil { return nil, false } - return o.Volumes, true + return o.Loadbalancers, true } -// SetVolumes sets field value -func (o *DataCenterEntities) SetVolumes(v Volumes) { +// SetLoadbalancers sets field value +func (o *DataCenterEntities) SetLoadbalancers(v Loadbalancers) { - o.Volumes = &v + o.Loadbalancers = &v } -// HasVolumes returns a boolean if a field has been set. -func (o *DataCenterEntities) HasVolumes() bool { - if o != nil && o.Volumes != nil { +// HasLoadbalancers returns a boolean if a field has been set. +func (o *DataCenterEntities) HasLoadbalancers() bool { + if o != nil && o.Loadbalancers != nil { return true } return false } -// GetLoadbalancers returns the Loadbalancers field value -// If the value is explicit nil, the zero value for Loadbalancers will be returned -func (o *DataCenterEntities) GetLoadbalancers() *Loadbalancers { +// GetNatgateways returns the Natgateways field value +// If the value is explicit nil, nil is returned +func (o *DataCenterEntities) GetNatgateways() *NatGateways { if o == nil { return nil } - return o.Loadbalancers + return o.Natgateways } -// GetLoadbalancersOk returns a tuple with the Loadbalancers field value +// GetNatgatewaysOk returns a tuple with the Natgateways field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DataCenterEntities) GetLoadbalancersOk() (*Loadbalancers, bool) { +func (o *DataCenterEntities) GetNatgatewaysOk() (*NatGateways, bool) { if o == nil { return nil, false } - return o.Loadbalancers, true + return o.Natgateways, true } -// SetLoadbalancers sets field value -func (o *DataCenterEntities) SetLoadbalancers(v Loadbalancers) { +// SetNatgateways sets field value +func (o *DataCenterEntities) SetNatgateways(v NatGateways) { - o.Loadbalancers = &v + o.Natgateways = &v } -// HasLoadbalancers returns a boolean if a field has been set. -func (o *DataCenterEntities) HasLoadbalancers() bool { - if o != nil && o.Loadbalancers != nil { +// HasNatgateways returns a boolean if a field has been set. +func (o *DataCenterEntities) HasNatgateways() bool { + if o != nil && o.Natgateways != nil { return true } return false } -// GetLans returns the Lans field value -// If the value is explicit nil, the zero value for Lans will be returned -func (o *DataCenterEntities) GetLans() *Lans { +// GetNetworkloadbalancers returns the Networkloadbalancers field value +// If the value is explicit nil, nil is returned +func (o *DataCenterEntities) GetNetworkloadbalancers() *NetworkLoadBalancers { if o == nil { return nil } - return o.Lans + return o.Networkloadbalancers } -// GetLansOk returns a tuple with the Lans field value +// GetNetworkloadbalancersOk returns a tuple with the Networkloadbalancers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DataCenterEntities) GetLansOk() (*Lans, bool) { +func (o *DataCenterEntities) GetNetworkloadbalancersOk() (*NetworkLoadBalancers, bool) { if o == nil { return nil, false } - return o.Lans, true + return o.Networkloadbalancers, true } -// SetLans sets field value -func (o *DataCenterEntities) SetLans(v Lans) { +// SetNetworkloadbalancers sets field value +func (o *DataCenterEntities) SetNetworkloadbalancers(v NetworkLoadBalancers) { - o.Lans = &v + o.Networkloadbalancers = &v } -// HasLans returns a boolean if a field has been set. -func (o *DataCenterEntities) HasLans() bool { - if o != nil && o.Lans != nil { +// HasNetworkloadbalancers returns a boolean if a field has been set. +func (o *DataCenterEntities) HasNetworkloadbalancers() bool { + if o != nil && o.Networkloadbalancers != nil { return true } return false } -// GetNetworkloadbalancers returns the Networkloadbalancers field value -// If the value is explicit nil, the zero value for NetworkLoadBalancers will be returned -func (o *DataCenterEntities) GetNetworkloadbalancers() *NetworkLoadBalancers { +// GetServers returns the Servers field value +// If the value is explicit nil, nil is returned +func (o *DataCenterEntities) GetServers() *Servers { if o == nil { return nil } - return o.Networkloadbalancers + return o.Servers } -// GetNetworkloadbalancersOk returns a tuple with the Networkloadbalancers field value +// GetServersOk returns a tuple with the Servers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DataCenterEntities) GetNetworkloadbalancersOk() (*NetworkLoadBalancers, bool) { +func (o *DataCenterEntities) GetServersOk() (*Servers, bool) { if o == nil { return nil, false } - return o.Networkloadbalancers, true + return o.Servers, true } -// SetNetworkloadbalancers sets field value -func (o *DataCenterEntities) SetNetworkloadbalancers(v NetworkLoadBalancers) { +// SetServers sets field value +func (o *DataCenterEntities) SetServers(v Servers) { - o.Networkloadbalancers = &v + o.Servers = &v } -// HasNetworkloadbalancers returns a boolean if a field has been set. -func (o *DataCenterEntities) HasNetworkloadbalancers() bool { - if o != nil && o.Networkloadbalancers != nil { +// HasServers returns a boolean if a field has been set. +func (o *DataCenterEntities) HasServers() bool { + if o != nil && o.Servers != nil { return true } return false } -// GetNatgateways returns the Natgateways field value -// If the value is explicit nil, the zero value for NatGateways will be returned -func (o *DataCenterEntities) GetNatgateways() *NatGateways { +// GetVolumes returns the Volumes field value +// If the value is explicit nil, nil is returned +func (o *DataCenterEntities) GetVolumes() *Volumes { if o == nil { return nil } - return o.Natgateways + return o.Volumes } -// GetNatgatewaysOk returns a tuple with the Natgateways field value +// GetVolumesOk returns a tuple with the Volumes field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DataCenterEntities) GetNatgatewaysOk() (*NatGateways, bool) { +func (o *DataCenterEntities) GetVolumesOk() (*Volumes, bool) { if o == nil { return nil, false } - return o.Natgateways, true + return o.Volumes, true } -// SetNatgateways sets field value -func (o *DataCenterEntities) SetNatgateways(v NatGateways) { +// SetVolumes sets field value +func (o *DataCenterEntities) SetVolumes(v Volumes) { - o.Natgateways = &v + o.Volumes = &v } -// HasNatgateways returns a boolean if a field has been set. -func (o *DataCenterEntities) HasNatgateways() bool { - if o != nil && o.Natgateways != nil { +// HasVolumes returns a boolean if a field has been set. +func (o *DataCenterEntities) HasVolumes() bool { + if o != nil && o.Volumes != nil { return true } @@ -272,24 +272,30 @@ func (o *DataCenterEntities) HasNatgateways() bool { func (o DataCenterEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Servers != nil { - toSerialize["servers"] = o.Servers - } - if o.Volumes != nil { - toSerialize["volumes"] = o.Volumes + if o.Lans != nil { + toSerialize["lans"] = o.Lans } + if o.Loadbalancers != nil { toSerialize["loadbalancers"] = o.Loadbalancers } - if o.Lans != nil { - toSerialize["lans"] = o.Lans + + if o.Natgateways != nil { + toSerialize["natgateways"] = o.Natgateways } + if o.Networkloadbalancers != nil { toSerialize["networkloadbalancers"] = o.Networkloadbalancers } - if o.Natgateways != nil { - toSerialize["natgateways"] = o.Natgateways + + if o.Servers != nil { + toSerialize["servers"] = o.Servers } + + if o.Volumes != nil { + toSerialize["volumes"] = o.Volumes + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter.go index 45a4e9d7dac2..9b53f656c726 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter.go @@ -16,15 +16,15 @@ import ( // Datacenter struct for Datacenter type Datacenter struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *DataCenterEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *DatacenterProperties `json:"properties"` - Entities *DataCenterEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewDatacenter instantiates a new Datacenter object @@ -47,114 +47,114 @@ func NewDatacenterWithDefaults() *Datacenter { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Datacenter) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Datacenter) GetEntities() *DataCenterEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenter) GetIdOk() (*string, bool) { +func (o *Datacenter) GetEntitiesOk() (*DataCenterEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Datacenter) SetId(v string) { +// SetEntities sets field value +func (o *Datacenter) SetEntities(v DataCenterEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Datacenter) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Datacenter) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Datacenter) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Datacenter) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenter) GetTypeOk() (*Type, bool) { +func (o *Datacenter) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Datacenter) SetType(v Type) { +// SetHref sets field value +func (o *Datacenter) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Datacenter) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Datacenter) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Datacenter) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Datacenter) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenter) GetHrefOk() (*string, bool) { +func (o *Datacenter) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Datacenter) SetHref(v string) { +// SetId sets field value +func (o *Datacenter) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Datacenter) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Datacenter) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *Datacenter) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *Datacenter) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *Datacenter) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for DatacenterProperties will be returned +// If the value is explicit nil, nil is returned func (o *Datacenter) GetProperties() *DatacenterProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *Datacenter) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for DataCenterEntities will be returned -func (o *Datacenter) GetEntities() *DataCenterEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Datacenter) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenter) GetEntitiesOk() (*DataCenterEntities, bool) { +func (o *Datacenter) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Datacenter) SetEntities(v DataCenterEntities) { +// SetType sets field value +func (o *Datacenter) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Datacenter) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Datacenter) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *Datacenter) HasEntities() bool { func (o Datacenter) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_element_metadata.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_element_metadata.go index 6f504314d25b..d0d262ff5113 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_element_metadata.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_element_metadata.go @@ -17,21 +17,21 @@ import ( // DatacenterElementMetadata struct for DatacenterElementMetadata type DatacenterElementMetadata struct { - // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. - Etag *string `json:"etag,omitempty"` - // The last time the resource was created. - CreatedDate *IonosTime // The user who created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The unique ID of the user who created the resource. CreatedByUserId *string `json:"createdByUserId,omitempty"` - // The last time the resource was modified. - LastModifiedDate *IonosTime + // The last time the resource was created. + CreatedDate *IonosTime + // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. + Etag *string `json:"etag,omitempty"` // The user who last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The unique ID of the user who last modified the resource. LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` - // State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool. + // The last time the resource was modified. + LastModifiedDate *IonosTime + // State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool. State *string `json:"state,omitempty"` } @@ -53,91 +53,8 @@ func NewDatacenterElementMetadataWithDefaults() *DatacenterElementMetadata { return &this } -// GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *DatacenterElementMetadata) GetEtag() *string { - if o == nil { - return nil - } - - return o.Etag - -} - -// GetEtagOk returns a tuple with the Etag field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterElementMetadata) GetEtagOk() (*string, bool) { - if o == nil { - return nil, false - } - - return o.Etag, true -} - -// SetEtag sets field value -func (o *DatacenterElementMetadata) SetEtag(v string) { - - o.Etag = &v - -} - -// HasEtag returns a boolean if a field has been set. -func (o *DatacenterElementMetadata) HasEtag() bool { - if o != nil && o.Etag != nil { - return true - } - - return false -} - -// GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *DatacenterElementMetadata) GetCreatedDate() *time.Time { - if o == nil { - return nil - } - - if o.CreatedDate == nil { - return nil - } - return &o.CreatedDate.Time - -} - -// GetCreatedDateOk returns a tuple with the CreatedDate field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterElementMetadata) GetCreatedDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.CreatedDate == nil { - return nil, false - } - return &o.CreatedDate.Time, true - -} - -// SetCreatedDate sets field value -func (o *DatacenterElementMetadata) SetCreatedDate(v time.Time) { - - o.CreatedDate = &IonosTime{v} - -} - -// HasCreatedDate returns a boolean if a field has been set. -func (o *DatacenterElementMetadata) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { - return true - } - - return false -} - // GetCreatedBy returns the CreatedBy field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetCreatedBy() *string { if o == nil { return nil @@ -175,7 +92,7 @@ func (o *DatacenterElementMetadata) HasCreatedBy() bool { } // GetCreatedByUserId returns the CreatedByUserId field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetCreatedByUserId() *string { if o == nil { return nil @@ -212,45 +129,83 @@ func (o *DatacenterElementMetadata) HasCreatedByUserId() bool { return false } -// GetLastModifiedDate returns the LastModifiedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *DatacenterElementMetadata) GetLastModifiedDate() *time.Time { +// GetCreatedDate returns the CreatedDate field value +// If the value is explicit nil, nil is returned +func (o *DatacenterElementMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } - if o.LastModifiedDate == nil { + if o.CreatedDate == nil { return nil } - return &o.LastModifiedDate.Time + return &o.CreatedDate.Time } -// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value +// GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterElementMetadata) GetLastModifiedDateOk() (*time.Time, bool) { +func (o *DatacenterElementMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - if o.LastModifiedDate == nil { + if o.CreatedDate == nil { return nil, false } - return &o.LastModifiedDate.Time, true + return &o.CreatedDate.Time, true } -// SetLastModifiedDate sets field value -func (o *DatacenterElementMetadata) SetLastModifiedDate(v time.Time) { +// SetCreatedDate sets field value +func (o *DatacenterElementMetadata) SetCreatedDate(v time.Time) { - o.LastModifiedDate = &IonosTime{v} + o.CreatedDate = &IonosTime{v} } -// HasLastModifiedDate returns a boolean if a field has been set. -func (o *DatacenterElementMetadata) HasLastModifiedDate() bool { - if o != nil && o.LastModifiedDate != nil { +// HasCreatedDate returns a boolean if a field has been set. +func (o *DatacenterElementMetadata) HasCreatedDate() bool { + if o != nil && o.CreatedDate != nil { + return true + } + + return false +} + +// GetEtag returns the Etag field value +// If the value is explicit nil, nil is returned +func (o *DatacenterElementMetadata) GetEtag() *string { + if o == nil { + return nil + } + + return o.Etag + +} + +// GetEtagOk returns a tuple with the Etag field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatacenterElementMetadata) GetEtagOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Etag, true +} + +// SetEtag sets field value +func (o *DatacenterElementMetadata) SetEtag(v string) { + + o.Etag = &v + +} + +// HasEtag returns a boolean if a field has been set. +func (o *DatacenterElementMetadata) HasEtag() bool { + if o != nil && o.Etag != nil { return true } @@ -258,7 +213,7 @@ func (o *DatacenterElementMetadata) HasLastModifiedDate() bool { } // GetLastModifiedBy returns the LastModifiedBy field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetLastModifiedBy() *string { if o == nil { return nil @@ -296,7 +251,7 @@ func (o *DatacenterElementMetadata) HasLastModifiedBy() bool { } // GetLastModifiedByUserId returns the LastModifiedByUserId field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetLastModifiedByUserId() *string { if o == nil { return nil @@ -333,8 +288,53 @@ func (o *DatacenterElementMetadata) HasLastModifiedByUserId() bool { return false } +// GetLastModifiedDate returns the LastModifiedDate field value +// If the value is explicit nil, nil is returned +func (o *DatacenterElementMetadata) GetLastModifiedDate() *time.Time { + if o == nil { + return nil + } + + if o.LastModifiedDate == nil { + return nil + } + return &o.LastModifiedDate.Time + +} + +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatacenterElementMetadata) GetLastModifiedDateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + + if o.LastModifiedDate == nil { + return nil, false + } + return &o.LastModifiedDate.Time, true + +} + +// SetLastModifiedDate sets field value +func (o *DatacenterElementMetadata) SetLastModifiedDate(v time.Time) { + + o.LastModifiedDate = &IonosTime{v} + +} + +// HasLastModifiedDate returns a boolean if a field has been set. +func (o *DatacenterElementMetadata) HasLastModifiedDate() bool { + if o != nil && o.LastModifiedDate != nil { + return true + } + + return false +} + // GetState returns the State field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetState() *string { if o == nil { return nil @@ -373,30 +373,38 @@ func (o *DatacenterElementMetadata) HasState() bool { func (o DatacenterElementMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Etag != nil { - toSerialize["etag"] = o.Etag - } - if o.CreatedDate != nil { - toSerialize["createdDate"] = o.CreatedDate - } if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } + if o.CreatedByUserId != nil { toSerialize["createdByUserId"] = o.CreatedByUserId } - if o.LastModifiedDate != nil { - toSerialize["lastModifiedDate"] = o.LastModifiedDate + + if o.CreatedDate != nil { + toSerialize["createdDate"] = o.CreatedDate } + + if o.Etag != nil { + toSerialize["etag"] = o.Etag + } + if o.LastModifiedBy != nil { toSerialize["lastModifiedBy"] = o.LastModifiedBy } + if o.LastModifiedByUserId != nil { toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId } + + if o.LastModifiedDate != nil { + toSerialize["lastModifiedDate"] = o.LastModifiedDate + } + if o.State != nil { toSerialize["state"] = o.State } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_properties.go index 7ea457242209..454fd49622d4 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenter_properties.go @@ -16,20 +16,23 @@ import ( // DatacenterProperties struct for DatacenterProperties type DatacenterProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` + // Array of features and CPU families available in a location + CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"` // A description for the datacenter, such as staging, production. Description *string `json:"description,omitempty"` - // The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). - Location *string `json:"location"` - // The version of the data center; incremented with every change. - Version *int32 `json:"version,omitempty"` // List of features supported by the location where this data center is provisioned. Features *[]string `json:"features,omitempty"` + // This value is either 'null' or contains an automatically-assigned /56 IPv6 CIDR block if IPv6 is enabled on this virtual data center. It can neither be changed nor removed. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` + Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` + // The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). + Location *string `json:"location"` + // The name of the resource. + Name *string `json:"name,omitempty"` // Boolean value representing if the data center requires extra protection, such as two-step verification. SecAuthProtection *bool `json:"secAuthProtection,omitempty"` - // Array of features and CPU families available in a location - CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"` + // The version of the data center; incremented with every change. + Version *int32 `json:"version,omitempty"` } // NewDatacenterProperties instantiates a new DatacenterProperties object @@ -52,38 +55,38 @@ func NewDatacenterPropertiesWithDefaults() *DatacenterProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *DatacenterProperties) GetName() *string { +// GetCpuArchitecture returns the CpuArchitecture field value +// If the value is explicit nil, nil is returned +func (o *DatacenterProperties) GetCpuArchitecture() *[]CpuArchitectureProperties { if o == nil { return nil } - return o.Name + return o.CpuArchitecture } -// GetNameOk returns a tuple with the Name field value +// GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterProperties) GetNameOk() (*string, bool) { +func (o *DatacenterProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) { if o == nil { return nil, false } - return o.Name, true + return o.CpuArchitecture, true } -// SetName sets field value -func (o *DatacenterProperties) SetName(v string) { +// SetCpuArchitecture sets field value +func (o *DatacenterProperties) SetCpuArchitecture(v []CpuArchitectureProperties) { - o.Name = &v + o.CpuArchitecture = &v } -// HasName returns a boolean if a field has been set. -func (o *DatacenterProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasCpuArchitecture returns a boolean if a field has been set. +func (o *DatacenterProperties) HasCpuArchitecture() bool { + if o != nil && o.CpuArchitecture != nil { return true } @@ -91,7 +94,7 @@ func (o *DatacenterProperties) HasName() bool { } // GetDescription returns the Description field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetDescription() *string { if o == nil { return nil @@ -128,114 +131,157 @@ func (o *DatacenterProperties) HasDescription() bool { return false } -// GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *DatacenterProperties) GetLocation() *string { +// GetFeatures returns the Features field value +// If the value is explicit nil, nil is returned +func (o *DatacenterProperties) GetFeatures() *[]string { if o == nil { return nil } - return o.Location + return o.Features } -// GetLocationOk returns a tuple with the Location field value +// GetFeaturesOk returns a tuple with the Features field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterProperties) GetLocationOk() (*string, bool) { +func (o *DatacenterProperties) GetFeaturesOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Location, true + return o.Features, true } -// SetLocation sets field value -func (o *DatacenterProperties) SetLocation(v string) { +// SetFeatures sets field value +func (o *DatacenterProperties) SetFeatures(v []string) { - o.Location = &v + o.Features = &v } -// HasLocation returns a boolean if a field has been set. -func (o *DatacenterProperties) HasLocation() bool { - if o != nil && o.Location != nil { +// HasFeatures returns a boolean if a field has been set. +func (o *DatacenterProperties) HasFeatures() bool { + if o != nil && o.Features != nil { return true } return false } -// GetVersion returns the Version field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *DatacenterProperties) GetVersion() *int32 { +// GetIpv6CidrBlock returns the Ipv6CidrBlock field value +// If the value is explicit nil, nil is returned +func (o *DatacenterProperties) GetIpv6CidrBlock() *string { if o == nil { return nil } - return o.Version + return o.Ipv6CidrBlock } -// GetVersionOk returns a tuple with the Version field value +// GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterProperties) GetVersionOk() (*int32, bool) { +func (o *DatacenterProperties) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } - return o.Version, true + return o.Ipv6CidrBlock, true } -// SetVersion sets field value -func (o *DatacenterProperties) SetVersion(v int32) { +// SetIpv6CidrBlock sets field value +func (o *DatacenterProperties) SetIpv6CidrBlock(v string) { - o.Version = &v + o.Ipv6CidrBlock = &v } -// HasVersion returns a boolean if a field has been set. -func (o *DatacenterProperties) HasVersion() bool { - if o != nil && o.Version != nil { +// sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled +func (o *DatacenterProperties) SetIpv6CidrBlockNil() { + o.Ipv6CidrBlock = &Nilstring +} + +// HasIpv6CidrBlock returns a boolean if a field has been set. +func (o *DatacenterProperties) HasIpv6CidrBlock() bool { + if o != nil && o.Ipv6CidrBlock != nil { return true } return false } -// GetFeatures returns the Features field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *DatacenterProperties) GetFeatures() *[]string { +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *DatacenterProperties) GetLocation() *string { if o == nil { return nil } - return o.Features + return o.Location } -// GetFeaturesOk returns a tuple with the Features field value +// GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterProperties) GetFeaturesOk() (*[]string, bool) { +func (o *DatacenterProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - return o.Features, true + return o.Location, true } -// SetFeatures sets field value -func (o *DatacenterProperties) SetFeatures(v []string) { +// SetLocation sets field value +func (o *DatacenterProperties) SetLocation(v string) { - o.Features = &v + o.Location = &v } -// HasFeatures returns a boolean if a field has been set. -func (o *DatacenterProperties) HasFeatures() bool { - if o != nil && o.Features != nil { +// HasLocation returns a boolean if a field has been set. +func (o *DatacenterProperties) HasLocation() bool { + if o != nil && o.Location != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *DatacenterProperties) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatacenterProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *DatacenterProperties) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *DatacenterProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -243,7 +289,7 @@ func (o *DatacenterProperties) HasFeatures() bool { } // GetSecAuthProtection returns the SecAuthProtection field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetSecAuthProtection() *bool { if o == nil { return nil @@ -280,38 +326,38 @@ func (o *DatacenterProperties) HasSecAuthProtection() bool { return false } -// GetCpuArchitecture returns the CpuArchitecture field value -// If the value is explicit nil, the zero value for []CpuArchitectureProperties will be returned -func (o *DatacenterProperties) GetCpuArchitecture() *[]CpuArchitectureProperties { +// GetVersion returns the Version field value +// If the value is explicit nil, nil is returned +func (o *DatacenterProperties) GetVersion() *int32 { if o == nil { return nil } - return o.CpuArchitecture + return o.Version } -// GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value +// GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DatacenterProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) { +func (o *DatacenterProperties) GetVersionOk() (*int32, bool) { if o == nil { return nil, false } - return o.CpuArchitecture, true + return o.Version, true } -// SetCpuArchitecture sets field value -func (o *DatacenterProperties) SetCpuArchitecture(v []CpuArchitectureProperties) { +// SetVersion sets field value +func (o *DatacenterProperties) SetVersion(v int32) { - o.CpuArchitecture = &v + o.Version = &v } -// HasCpuArchitecture returns a boolean if a field has been set. -func (o *DatacenterProperties) HasCpuArchitecture() bool { - if o != nil && o.CpuArchitecture != nil { +// HasVersion returns a boolean if a field has been set. +func (o *DatacenterProperties) HasVersion() bool { + if o != nil && o.Version != nil { return true } @@ -320,27 +366,39 @@ func (o *DatacenterProperties) HasCpuArchitecture() bool { func (o DatacenterProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.CpuArchitecture != nil { + toSerialize["cpuArchitecture"] = o.CpuArchitecture } + if o.Description != nil { toSerialize["description"] = o.Description } + + if o.Features != nil { + toSerialize["features"] = o.Features + } + + if o.Ipv6CidrBlock == &Nilstring { + toSerialize["ipv6CidrBlock"] = nil + } else if o.Ipv6CidrBlock != nil { + toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock + } if o.Location != nil { toSerialize["location"] = o.Location } - if o.Version != nil { - toSerialize["version"] = o.Version - } - if o.Features != nil { - toSerialize["features"] = o.Features + + if o.Name != nil { + toSerialize["name"] = o.Name } + if o.SecAuthProtection != nil { toSerialize["secAuthProtection"] = o.SecAuthProtection } - if o.CpuArchitecture != nil { - toSerialize["cpuArchitecture"] = o.CpuArchitecture + + if o.Version != nil { + toSerialize["version"] = o.Version } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenters.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenters.go index 28911601f0c1..43c00c3c7daa 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenters.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_datacenters.go @@ -16,19 +16,19 @@ import ( // Datacenters struct for Datacenters type Datacenters struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Datacenter `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewDatacenters instantiates a new Datacenters object @@ -49,114 +49,114 @@ func NewDatacentersWithDefaults() *Datacenters { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Datacenters) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Datacenters) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenters) GetIdOk() (*string, bool) { +func (o *Datacenters) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Datacenters) SetId(v string) { +// SetLinks sets field value +func (o *Datacenters) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Datacenters) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Datacenters) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Datacenters) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Datacenters) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenters) GetTypeOk() (*Type, bool) { +func (o *Datacenters) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Datacenters) SetType(v Type) { +// SetHref sets field value +func (o *Datacenters) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Datacenters) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Datacenters) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Datacenters) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Datacenters) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenters) GetHrefOk() (*string, bool) { +func (o *Datacenters) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Datacenters) SetHref(v string) { +// SetId sets field value +func (o *Datacenters) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Datacenters) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Datacenters) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Datacenters) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Datacenter will be returned +// If the value is explicit nil, nil is returned func (o *Datacenters) GetItems() *[]Datacenter { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Datacenters) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Datacenters) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Datacenters) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenters) GetOffsetOk() (*float32, bool) { +func (o *Datacenters) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Datacenters) SetOffset(v float32) { +// SetLimit sets field value +func (o *Datacenters) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Datacenters) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Datacenters) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Datacenters) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Datacenters) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenters) GetLimitOk() (*float32, bool) { +func (o *Datacenters) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Datacenters) SetLimit(v float32) { +// SetOffset sets field value +func (o *Datacenters) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Datacenters) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Datacenters) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Datacenters) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Datacenters) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Datacenters) GetLinksOk() (*PaginationLinks, bool) { +func (o *Datacenters) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Datacenters) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Datacenters) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Datacenters) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Datacenters) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Datacenters) HasLinks() bool { func (o Datacenters) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error.go index a383952b7923..d5e52dd39b04 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error.go @@ -40,7 +40,7 @@ func NewErrorWithDefaults() *Error { } // GetHttpStatus returns the HttpStatus field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *Error) GetHttpStatus() *int32 { if o == nil { return nil @@ -78,7 +78,7 @@ func (o *Error) HasHttpStatus() bool { } // GetMessages returns the Messages field value -// If the value is explicit nil, the zero value for []ErrorMessage will be returned +// If the value is explicit nil, nil is returned func (o *Error) GetMessages() *[]ErrorMessage { if o == nil { return nil @@ -120,9 +120,11 @@ func (o Error) MarshalJSON() ([]byte, error) { if o.HttpStatus != nil { toSerialize["httpStatus"] = o.HttpStatus } + if o.Messages != nil { toSerialize["messages"] = o.Messages } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error_message.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error_message.go index f3044d977df4..d567be376c3b 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error_message.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_error_message.go @@ -41,7 +41,7 @@ func NewErrorMessageWithDefaults() *ErrorMessage { } // GetErrorCode returns the ErrorCode field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *ErrorMessage) GetErrorCode() *string { if o == nil { return nil @@ -79,7 +79,7 @@ func (o *ErrorMessage) HasErrorCode() bool { } // GetMessage returns the Message field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *ErrorMessage) GetMessage() *string { if o == nil { return nil @@ -121,9 +121,11 @@ func (o ErrorMessage) MarshalJSON() ([]byte, error) { if o.ErrorCode != nil { toSerialize["errorCode"] = o.ErrorCode } + if o.Message != nil { toSerialize["message"] = o.Message } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rule.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rule.go index 6b472e4e9135..88f0f5ead32f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rule.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rule.go @@ -16,14 +16,14 @@ import ( // FirewallRule struct for FirewallRule type FirewallRule struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *FirewallruleProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewFirewallRule instantiates a new FirewallRule object @@ -46,190 +46,190 @@ func NewFirewallRuleWithDefaults() *FirewallRule { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallRule) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *FirewallRule) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRule) GetIdOk() (*string, bool) { +func (o *FirewallRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *FirewallRule) SetId(v string) { +// SetHref sets field value +func (o *FirewallRule) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *FirewallRule) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *FirewallRule) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *FirewallRule) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *FirewallRule) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRule) GetTypeOk() (*Type, bool) { +func (o *FirewallRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *FirewallRule) SetType(v Type) { +// SetId sets field value +func (o *FirewallRule) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *FirewallRule) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *FirewallRule) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallRule) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *FirewallRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRule) GetHrefOk() (*string, bool) { +func (o *FirewallRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *FirewallRule) SetHref(v string) { +// SetMetadata sets field value +func (o *FirewallRule) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *FirewallRule) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *FirewallRule) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *FirewallRule) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *FirewallRule) GetProperties() *FirewallruleProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *FirewallRule) GetPropertiesOk() (*FirewallruleProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *FirewallRule) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *FirewallRule) SetProperties(v FirewallruleProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *FirewallRule) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *FirewallRule) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for FirewallruleProperties will be returned -func (o *FirewallRule) GetProperties() *FirewallruleProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *FirewallRule) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRule) GetPropertiesOk() (*FirewallruleProperties, bool) { +func (o *FirewallRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *FirewallRule) SetProperties(v FirewallruleProperties) { +// SetType sets field value +func (o *FirewallRule) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *FirewallRule) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *FirewallRule) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *FirewallRule) HasProperties() bool { func (o FirewallRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rules.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rules.go index f3b572931ca0..5701dda1200a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rules.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewall_rules.go @@ -16,19 +16,19 @@ import ( // FirewallRules struct for FirewallRules type FirewallRules struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]FirewallRule `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewFirewallRules instantiates a new FirewallRules object @@ -49,114 +49,114 @@ func NewFirewallRulesWithDefaults() *FirewallRules { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallRules) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *FirewallRules) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRules) GetIdOk() (*string, bool) { +func (o *FirewallRules) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *FirewallRules) SetId(v string) { +// SetLinks sets field value +func (o *FirewallRules) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *FirewallRules) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *FirewallRules) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *FirewallRules) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *FirewallRules) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRules) GetTypeOk() (*Type, bool) { +func (o *FirewallRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *FirewallRules) SetType(v Type) { +// SetHref sets field value +func (o *FirewallRules) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *FirewallRules) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *FirewallRules) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallRules) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *FirewallRules) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRules) GetHrefOk() (*string, bool) { +func (o *FirewallRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *FirewallRules) SetHref(v string) { +// SetId sets field value +func (o *FirewallRules) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *FirewallRules) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *FirewallRules) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *FirewallRules) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []FirewallRule will be returned +// If the value is explicit nil, nil is returned func (o *FirewallRules) GetItems() *[]FirewallRule { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *FirewallRules) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *FirewallRules) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *FirewallRules) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRules) GetOffsetOk() (*float32, bool) { +func (o *FirewallRules) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *FirewallRules) SetOffset(v float32) { +// SetLimit sets field value +func (o *FirewallRules) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *FirewallRules) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *FirewallRules) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *FirewallRules) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *FirewallRules) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRules) GetLimitOk() (*float32, bool) { +func (o *FirewallRules) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *FirewallRules) SetLimit(v float32) { +// SetOffset sets field value +func (o *FirewallRules) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *FirewallRules) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *FirewallRules) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *FirewallRules) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *FirewallRules) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallRules) GetLinksOk() (*PaginationLinks, bool) { +func (o *FirewallRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *FirewallRules) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *FirewallRules) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *FirewallRules) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *FirewallRules) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *FirewallRules) HasLinks() bool { func (o FirewallRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewallrule_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewallrule_properties.go index 188c3e7f18f2..0e5de49b3b32 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewallrule_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_firewallrule_properties.go @@ -16,24 +16,32 @@ import ( // FirewallruleProperties struct for FirewallruleProperties type FirewallruleProperties struct { + // Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilint32` can be used, or the setter `SetIcmpCodeNil` + IcmpCode *int32 `json:"icmpCode,omitempty"` + // Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilint32` can be used, or the setter `SetIcmpTypeNil` + IcmpType *int32 `json:"icmpType,omitempty"` + // The IP version for this rule. If sourceIp or targetIp are specified, you can omit this value - the IP version will then be deduced from the IP address(es) used; if you specify it anyway, it must match the specified IP address(es). If neither sourceIp nor targetIp are specified, this rule allows traffic only for the specified IP version. If neither sourceIp, targetIp nor ipVersion are specified, this rule will only allow IPv4 traffic. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpVersionNil` + IpVersion *string `json:"ipVersion,omitempty"` // The name of the resource. Name *string `json:"name,omitempty"` + // Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. + PortRangeEnd *int32 `json:"portRangeEnd,omitempty"` + // Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. + PortRangeStart *int32 `json:"portRangeStart,omitempty"` // The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests). Protocol *string `json:"protocol"` + // Only traffic originating from the respective IP address (or CIDR block) is allowed. Value null allows traffic from any IP address (according to the selected ipVersion). + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetSourceIpNil` + SourceIp *string `json:"sourceIp,omitempty"` // Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows traffic from any MAC address. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetSourceMacNil` SourceMac *string `json:"sourceMac,omitempty"` - // Only traffic originating from the respective IPv4 address is allowed. Value null allows traffic from any IP address. - SourceIp *string `json:"sourceIp,omitempty"` - // If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address of the NIC is allowed. Value null Value null allows traffic to any target IP address. + // If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address (or CIDR block) of the NIC is allowed. Value null allows traffic to any target IP address (according to the selected ipVersion). + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetTargetIpNil` TargetIp *string `json:"targetIp,omitempty"` - // Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes. - IcmpCode *int32 `json:"icmpCode,omitempty"` - // Defines the allowed type (from 0 to 254) if the protocol ICMP is chosen. Value null allows all types. - IcmpType *int32 `json:"icmpType,omitempty"` - // Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. - PortRangeStart *int32 `json:"portRangeStart,omitempty"` - // Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. - PortRangeEnd *int32 `json:"portRangeEnd,omitempty"` // The type of the firewall rule. If not specified, the default INGRESS value is used. Type *string `json:"type,omitempty"` } @@ -58,342 +66,410 @@ func NewFirewallrulePropertiesWithDefaults() *FirewallruleProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallruleProperties) GetName() *string { +// GetIcmpCode returns the IcmpCode field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetIcmpCode() *int32 { if o == nil { return nil } - return o.Name + return o.IcmpCode } -// GetNameOk returns a tuple with the Name field value +// GetIcmpCodeOk returns a tuple with the IcmpCode field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetNameOk() (*string, bool) { +func (o *FirewallruleProperties) GetIcmpCodeOk() (*int32, bool) { if o == nil { return nil, false } - return o.Name, true + return o.IcmpCode, true } -// SetName sets field value -func (o *FirewallruleProperties) SetName(v string) { +// SetIcmpCode sets field value +func (o *FirewallruleProperties) SetIcmpCode(v int32) { - o.Name = &v + o.IcmpCode = &v } -// HasName returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasName() bool { - if o != nil && o.Name != nil { +// sets IcmpCode to the explicit address that will be encoded as nil when marshaled +func (o *FirewallruleProperties) SetIcmpCodeNil() { + o.IcmpCode = &Nilint32 +} + +// HasIcmpCode returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasIcmpCode() bool { + if o != nil && o.IcmpCode != nil { return true } return false } -// GetProtocol returns the Protocol field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallruleProperties) GetProtocol() *string { +// GetIcmpType returns the IcmpType field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetIcmpType() *int32 { if o == nil { return nil } - return o.Protocol + return o.IcmpType } -// GetProtocolOk returns a tuple with the Protocol field value +// GetIcmpTypeOk returns a tuple with the IcmpType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetProtocolOk() (*string, bool) { +func (o *FirewallruleProperties) GetIcmpTypeOk() (*int32, bool) { if o == nil { return nil, false } - return o.Protocol, true + return o.IcmpType, true } -// SetProtocol sets field value -func (o *FirewallruleProperties) SetProtocol(v string) { +// SetIcmpType sets field value +func (o *FirewallruleProperties) SetIcmpType(v int32) { - o.Protocol = &v + o.IcmpType = &v } -// HasProtocol returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasProtocol() bool { - if o != nil && o.Protocol != nil { +// sets IcmpType to the explicit address that will be encoded as nil when marshaled +func (o *FirewallruleProperties) SetIcmpTypeNil() { + o.IcmpType = &Nilint32 +} + +// HasIcmpType returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasIcmpType() bool { + if o != nil && o.IcmpType != nil { return true } return false } -// GetSourceMac returns the SourceMac field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallruleProperties) GetSourceMac() *string { +// GetIpVersion returns the IpVersion field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetIpVersion() *string { if o == nil { return nil } - return o.SourceMac + return o.IpVersion } -// GetSourceMacOk returns a tuple with the SourceMac field value +// GetIpVersionOk returns a tuple with the IpVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetSourceMacOk() (*string, bool) { +func (o *FirewallruleProperties) GetIpVersionOk() (*string, bool) { if o == nil { return nil, false } - return o.SourceMac, true + return o.IpVersion, true } -// SetSourceMac sets field value -func (o *FirewallruleProperties) SetSourceMac(v string) { +// SetIpVersion sets field value +func (o *FirewallruleProperties) SetIpVersion(v string) { - o.SourceMac = &v + o.IpVersion = &v } -// HasSourceMac returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasSourceMac() bool { - if o != nil && o.SourceMac != nil { +// sets IpVersion to the explicit address that will be encoded as nil when marshaled +func (o *FirewallruleProperties) SetIpVersionNil() { + o.IpVersion = &Nilstring +} + +// HasIpVersion returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasIpVersion() bool { + if o != nil && o.IpVersion != nil { return true } return false } -// GetSourceIp returns the SourceIp field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallruleProperties) GetSourceIp() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetName() *string { if o == nil { return nil } - return o.SourceIp + return o.Name } -// GetSourceIpOk returns a tuple with the SourceIp field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetSourceIpOk() (*string, bool) { +func (o *FirewallruleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.SourceIp, true + return o.Name, true } -// SetSourceIp sets field value -func (o *FirewallruleProperties) SetSourceIp(v string) { +// SetName sets field value +func (o *FirewallruleProperties) SetName(v string) { - o.SourceIp = &v + o.Name = &v } -// HasSourceIp returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasSourceIp() bool { - if o != nil && o.SourceIp != nil { +// HasName returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetTargetIp returns the TargetIp field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FirewallruleProperties) GetTargetIp() *string { +// GetPortRangeEnd returns the PortRangeEnd field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetPortRangeEnd() *int32 { if o == nil { return nil } - return o.TargetIp + return o.PortRangeEnd } -// GetTargetIpOk returns a tuple with the TargetIp field value +// GetPortRangeEndOk returns a tuple with the PortRangeEnd field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetTargetIpOk() (*string, bool) { +func (o *FirewallruleProperties) GetPortRangeEndOk() (*int32, bool) { if o == nil { return nil, false } - return o.TargetIp, true + return o.PortRangeEnd, true } -// SetTargetIp sets field value -func (o *FirewallruleProperties) SetTargetIp(v string) { +// SetPortRangeEnd sets field value +func (o *FirewallruleProperties) SetPortRangeEnd(v int32) { - o.TargetIp = &v + o.PortRangeEnd = &v } -// HasTargetIp returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasTargetIp() bool { - if o != nil && o.TargetIp != nil { +// HasPortRangeEnd returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasPortRangeEnd() bool { + if o != nil && o.PortRangeEnd != nil { return true } return false } -// GetIcmpCode returns the IcmpCode field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *FirewallruleProperties) GetIcmpCode() *int32 { +// GetPortRangeStart returns the PortRangeStart field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetPortRangeStart() *int32 { if o == nil { return nil } - return o.IcmpCode + return o.PortRangeStart } -// GetIcmpCodeOk returns a tuple with the IcmpCode field value +// GetPortRangeStartOk returns a tuple with the PortRangeStart field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetIcmpCodeOk() (*int32, bool) { +func (o *FirewallruleProperties) GetPortRangeStartOk() (*int32, bool) { if o == nil { return nil, false } - return o.IcmpCode, true + return o.PortRangeStart, true } -// SetIcmpCode sets field value -func (o *FirewallruleProperties) SetIcmpCode(v int32) { +// SetPortRangeStart sets field value +func (o *FirewallruleProperties) SetPortRangeStart(v int32) { - o.IcmpCode = &v + o.PortRangeStart = &v } -// HasIcmpCode returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasIcmpCode() bool { - if o != nil && o.IcmpCode != nil { +// HasPortRangeStart returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasPortRangeStart() bool { + if o != nil && o.PortRangeStart != nil { return true } return false } -// GetIcmpType returns the IcmpType field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *FirewallruleProperties) GetIcmpType() *int32 { +// GetProtocol returns the Protocol field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetProtocol() *string { if o == nil { return nil } - return o.IcmpType + return o.Protocol } -// GetIcmpTypeOk returns a tuple with the IcmpType field value +// GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetIcmpTypeOk() (*int32, bool) { +func (o *FirewallruleProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } - return o.IcmpType, true + return o.Protocol, true } -// SetIcmpType sets field value -func (o *FirewallruleProperties) SetIcmpType(v int32) { +// SetProtocol sets field value +func (o *FirewallruleProperties) SetProtocol(v string) { - o.IcmpType = &v + o.Protocol = &v } -// HasIcmpType returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasIcmpType() bool { - if o != nil && o.IcmpType != nil { +// HasProtocol returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasProtocol() bool { + if o != nil && o.Protocol != nil { return true } return false } -// GetPortRangeStart returns the PortRangeStart field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *FirewallruleProperties) GetPortRangeStart() *int32 { +// GetSourceIp returns the SourceIp field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetSourceIp() *string { if o == nil { return nil } - return o.PortRangeStart + return o.SourceIp } -// GetPortRangeStartOk returns a tuple with the PortRangeStart field value +// GetSourceIpOk returns a tuple with the SourceIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetPortRangeStartOk() (*int32, bool) { +func (o *FirewallruleProperties) GetSourceIpOk() (*string, bool) { if o == nil { return nil, false } - return o.PortRangeStart, true + return o.SourceIp, true } -// SetPortRangeStart sets field value -func (o *FirewallruleProperties) SetPortRangeStart(v int32) { +// SetSourceIp sets field value +func (o *FirewallruleProperties) SetSourceIp(v string) { - o.PortRangeStart = &v + o.SourceIp = &v } -// HasPortRangeStart returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasPortRangeStart() bool { - if o != nil && o.PortRangeStart != nil { +// sets SourceIp to the explicit address that will be encoded as nil when marshaled +func (o *FirewallruleProperties) SetSourceIpNil() { + o.SourceIp = &Nilstring +} + +// HasSourceIp returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasSourceIp() bool { + if o != nil && o.SourceIp != nil { return true } return false } -// GetPortRangeEnd returns the PortRangeEnd field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *FirewallruleProperties) GetPortRangeEnd() *int32 { +// GetSourceMac returns the SourceMac field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetSourceMac() *string { if o == nil { return nil } - return o.PortRangeEnd + return o.SourceMac } -// GetPortRangeEndOk returns a tuple with the PortRangeEnd field value +// GetSourceMacOk returns a tuple with the SourceMac field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FirewallruleProperties) GetPortRangeEndOk() (*int32, bool) { +func (o *FirewallruleProperties) GetSourceMacOk() (*string, bool) { if o == nil { return nil, false } - return o.PortRangeEnd, true + return o.SourceMac, true } -// SetPortRangeEnd sets field value -func (o *FirewallruleProperties) SetPortRangeEnd(v int32) { +// SetSourceMac sets field value +func (o *FirewallruleProperties) SetSourceMac(v string) { - o.PortRangeEnd = &v + o.SourceMac = &v } -// HasPortRangeEnd returns a boolean if a field has been set. -func (o *FirewallruleProperties) HasPortRangeEnd() bool { - if o != nil && o.PortRangeEnd != nil { +// sets SourceMac to the explicit address that will be encoded as nil when marshaled +func (o *FirewallruleProperties) SetSourceMacNil() { + o.SourceMac = &Nilstring +} + +// HasSourceMac returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasSourceMac() bool { + if o != nil && o.SourceMac != nil { + return true + } + + return false +} + +// GetTargetIp returns the TargetIp field value +// If the value is explicit nil, nil is returned +func (o *FirewallruleProperties) GetTargetIp() *string { + if o == nil { + return nil + } + + return o.TargetIp + +} + +// GetTargetIpOk returns a tuple with the TargetIp field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallruleProperties) GetTargetIpOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.TargetIp, true +} + +// SetTargetIp sets field value +func (o *FirewallruleProperties) SetTargetIp(v string) { + + o.TargetIp = &v + +} + +// sets TargetIp to the explicit address that will be encoded as nil when marshaled +func (o *FirewallruleProperties) SetTargetIpNil() { + o.TargetIp = &Nilstring +} + +// HasTargetIp returns a boolean if a field has been set. +func (o *FirewallruleProperties) HasTargetIp() bool { + if o != nil && o.TargetIp != nil { return true } @@ -401,7 +477,7 @@ func (o *FirewallruleProperties) HasPortRangeEnd() bool { } // GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetType() *string { if o == nil { return nil @@ -440,26 +516,61 @@ func (o *FirewallruleProperties) HasType() bool { func (o FirewallruleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + + if o.IcmpCode == &Nilint32 { + toSerialize["icmpCode"] = nil + } else if o.IcmpCode != nil { + toSerialize["icmpCode"] = o.IcmpCode + } + + if o.IcmpType == &Nilint32 { + toSerialize["icmpType"] = nil + } else if o.IcmpType != nil { + toSerialize["icmpType"] = o.IcmpType + } + + if o.IpVersion == &Nilstring { + toSerialize["ipVersion"] = nil + } else if o.IpVersion != nil { + toSerialize["ipVersion"] = o.IpVersion + } if o.Name != nil { toSerialize["name"] = o.Name } - if o.Protocol != nil { - toSerialize["protocol"] = o.Protocol + + if o.PortRangeEnd != nil { + toSerialize["portRangeEnd"] = o.PortRangeEnd } - toSerialize["sourceMac"] = o.SourceMac - toSerialize["sourceIp"] = o.SourceIp - toSerialize["targetIp"] = o.TargetIp - toSerialize["icmpCode"] = o.IcmpCode - toSerialize["icmpType"] = o.IcmpType + if o.PortRangeStart != nil { toSerialize["portRangeStart"] = o.PortRangeStart } - if o.PortRangeEnd != nil { - toSerialize["portRangeEnd"] = o.PortRangeEnd + + if o.Protocol != nil { + toSerialize["protocol"] = o.Protocol + } + + if o.SourceIp == &Nilstring { + toSerialize["sourceIp"] = nil + } else if o.SourceIp != nil { + toSerialize["sourceIp"] = o.SourceIp + } + + if o.SourceMac == &Nilstring { + toSerialize["sourceMac"] = nil + } else if o.SourceMac != nil { + toSerialize["sourceMac"] = o.SourceMac + } + + if o.TargetIp == &Nilstring { + toSerialize["targetIp"] = nil + } else if o.TargetIp != nil { + toSerialize["targetIp"] = o.TargetIp } if o.Type != nil { toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log.go index ca6a5435c9a5..6e4412408898 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log.go @@ -16,14 +16,14 @@ import ( // FlowLog struct for FlowLog type FlowLog struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *FlowLogProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewFlowLog instantiates a new FlowLog object @@ -46,190 +46,190 @@ func NewFlowLogWithDefaults() *FlowLog { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLog) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *FlowLog) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLog) GetIdOk() (*string, bool) { +func (o *FlowLog) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *FlowLog) SetId(v string) { +// SetHref sets field value +func (o *FlowLog) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *FlowLog) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *FlowLog) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *FlowLog) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *FlowLog) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLog) GetTypeOk() (*Type, bool) { +func (o *FlowLog) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *FlowLog) SetType(v Type) { +// SetId sets field value +func (o *FlowLog) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *FlowLog) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *FlowLog) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLog) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *FlowLog) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLog) GetHrefOk() (*string, bool) { +func (o *FlowLog) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *FlowLog) SetHref(v string) { +// SetMetadata sets field value +func (o *FlowLog) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *FlowLog) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *FlowLog) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *FlowLog) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *FlowLog) GetProperties() *FlowLogProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLog) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *FlowLog) GetPropertiesOk() (*FlowLogProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *FlowLog) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *FlowLog) SetProperties(v FlowLogProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *FlowLog) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *FlowLog) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for FlowLogProperties will be returned -func (o *FlowLog) GetProperties() *FlowLogProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *FlowLog) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLog) GetPropertiesOk() (*FlowLogProperties, bool) { +func (o *FlowLog) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *FlowLog) SetProperties(v FlowLogProperties) { +// SetType sets field value +func (o *FlowLog) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *FlowLog) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *FlowLog) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *FlowLog) HasProperties() bool { func (o FlowLog) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_properties.go index 7d3df9fae7cd..0f2a3b202c56 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_properties.go @@ -16,27 +16,27 @@ import ( // FlowLogProperties struct for FlowLogProperties type FlowLogProperties struct { - // The name of the resource. - Name *string `json:"name"` // Specifies the traffic action pattern. Action *string `json:"action"` + // The S3 bucket name of an existing IONOS Cloud S3 bucket. + Bucket *string `json:"bucket"` // Specifies the traffic direction pattern. Direction *string `json:"direction"` - // S3 bucket name of an existing IONOS Cloud S3 bucket. - Bucket *string `json:"bucket"` + // The resource name. + Name *string `json:"name"` } // NewFlowLogProperties instantiates a new FlowLogProperties 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 NewFlowLogProperties(name string, action string, direction string, bucket string) *FlowLogProperties { +func NewFlowLogProperties(action string, bucket string, direction string, name string) *FlowLogProperties { this := FlowLogProperties{} - this.Name = &name this.Action = &action - this.Direction = &direction this.Bucket = &bucket + this.Direction = &direction + this.Name = &name return &this } @@ -49,76 +49,76 @@ func NewFlowLogPropertiesWithDefaults() *FlowLogProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogProperties) GetName() *string { +// GetAction returns the Action field value +// If the value is explicit nil, nil is returned +func (o *FlowLogProperties) GetAction() *string { if o == nil { return nil } - return o.Name + return o.Action } -// GetNameOk returns a tuple with the Name field value +// GetActionOk returns a tuple with the Action field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogProperties) GetNameOk() (*string, bool) { +func (o *FlowLogProperties) GetActionOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Action, true } -// SetName sets field value -func (o *FlowLogProperties) SetName(v string) { +// SetAction sets field value +func (o *FlowLogProperties) SetAction(v string) { - o.Name = &v + o.Action = &v } -// HasName returns a boolean if a field has been set. -func (o *FlowLogProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasAction returns a boolean if a field has been set. +func (o *FlowLogProperties) HasAction() bool { + if o != nil && o.Action != nil { return true } return false } -// GetAction returns the Action field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogProperties) GetAction() *string { +// GetBucket returns the Bucket field value +// If the value is explicit nil, nil is returned +func (o *FlowLogProperties) GetBucket() *string { if o == nil { return nil } - return o.Action + return o.Bucket } -// GetActionOk returns a tuple with the Action field value +// GetBucketOk returns a tuple with the Bucket field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogProperties) GetActionOk() (*string, bool) { +func (o *FlowLogProperties) GetBucketOk() (*string, bool) { if o == nil { return nil, false } - return o.Action, true + return o.Bucket, true } -// SetAction sets field value -func (o *FlowLogProperties) SetAction(v string) { +// SetBucket sets field value +func (o *FlowLogProperties) SetBucket(v string) { - o.Action = &v + o.Bucket = &v } -// HasAction returns a boolean if a field has been set. -func (o *FlowLogProperties) HasAction() bool { - if o != nil && o.Action != nil { +// HasBucket returns a boolean if a field has been set. +func (o *FlowLogProperties) HasBucket() bool { + if o != nil && o.Bucket != nil { return true } @@ -126,7 +126,7 @@ func (o *FlowLogProperties) HasAction() bool { } // GetDirection returns the Direction field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *FlowLogProperties) GetDirection() *string { if o == nil { return nil @@ -163,38 +163,38 @@ func (o *FlowLogProperties) HasDirection() bool { return false } -// GetBucket returns the Bucket field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogProperties) GetBucket() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *FlowLogProperties) GetName() *string { if o == nil { return nil } - return o.Bucket + return o.Name } -// GetBucketOk returns a tuple with the Bucket field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogProperties) GetBucketOk() (*string, bool) { +func (o *FlowLogProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Bucket, true + return o.Name, true } -// SetBucket sets field value -func (o *FlowLogProperties) SetBucket(v string) { +// SetName sets field value +func (o *FlowLogProperties) SetName(v string) { - o.Bucket = &v + o.Name = &v } -// HasBucket returns a boolean if a field has been set. -func (o *FlowLogProperties) HasBucket() bool { - if o != nil && o.Bucket != nil { +// HasName returns a boolean if a field has been set. +func (o *FlowLogProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -203,18 +203,22 @@ func (o *FlowLogProperties) HasBucket() bool { func (o FlowLogProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } if o.Action != nil { toSerialize["action"] = o.Action } + + if o.Bucket != nil { + toSerialize["bucket"] = o.Bucket + } + if o.Direction != nil { toSerialize["direction"] = o.Direction } - if o.Bucket != nil { - toSerialize["bucket"] = o.Bucket + + if o.Name != nil { + toSerialize["name"] = o.Name } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_put.go index 8f9b7f77781f..7fe84d71f667 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_log_put.go @@ -16,13 +16,13 @@ import ( // FlowLogPut struct for FlowLogPut type FlowLogPut struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *FlowLogProperties `json:"properties"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *FlowLogProperties `json:"properties"` } // NewFlowLogPut instantiates a new FlowLogPut object @@ -45,152 +45,152 @@ func NewFlowLogPutWithDefaults() *FlowLogPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogPut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *FlowLogPut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogPut) GetIdOk() (*string, bool) { +func (o *FlowLogPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *FlowLogPut) SetId(v string) { +// SetHref sets field value +func (o *FlowLogPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *FlowLogPut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *FlowLogPut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *FlowLogPut) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *FlowLogPut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogPut) GetTypeOk() (*Type, bool) { +func (o *FlowLogPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *FlowLogPut) SetType(v Type) { +// SetId sets field value +func (o *FlowLogPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *FlowLogPut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *FlowLogPut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogPut) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *FlowLogPut) GetProperties() *FlowLogProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogPut) GetHrefOk() (*string, bool) { +func (o *FlowLogPut) GetPropertiesOk() (*FlowLogProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *FlowLogPut) SetHref(v string) { +// SetProperties sets field value +func (o *FlowLogPut) SetProperties(v FlowLogProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *FlowLogPut) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *FlowLogPut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for FlowLogProperties will be returned -func (o *FlowLogPut) GetProperties() *FlowLogProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *FlowLogPut) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogPut) GetPropertiesOk() (*FlowLogProperties, bool) { +func (o *FlowLogPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *FlowLogPut) SetProperties(v FlowLogProperties) { +// SetType sets field value +func (o *FlowLogPut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *FlowLogPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *FlowLogPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *FlowLogPut) HasProperties() bool { func (o FlowLogPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_logs.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_logs.go index 6ecbeac2b06f..653d925ab213 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_logs.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_flow_logs.go @@ -16,19 +16,19 @@ import ( // FlowLogs struct for FlowLogs type FlowLogs struct { + Links *PaginationLinks `json:"_links,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]FlowLog `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewFlowLogs instantiates a new FlowLogs object @@ -49,114 +49,114 @@ func NewFlowLogsWithDefaults() *FlowLogs { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogs) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *FlowLogs) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogs) GetIdOk() (*string, bool) { +func (o *FlowLogs) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *FlowLogs) SetId(v string) { +// SetLinks sets field value +func (o *FlowLogs) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *FlowLogs) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *FlowLogs) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *FlowLogs) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *FlowLogs) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogs) GetTypeOk() (*Type, bool) { +func (o *FlowLogs) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *FlowLogs) SetType(v Type) { +// SetHref sets field value +func (o *FlowLogs) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *FlowLogs) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *FlowLogs) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *FlowLogs) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *FlowLogs) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogs) GetHrefOk() (*string, bool) { +func (o *FlowLogs) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *FlowLogs) SetHref(v string) { +// SetId sets field value +func (o *FlowLogs) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *FlowLogs) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *FlowLogs) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *FlowLogs) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []FlowLog will be returned +// If the value is explicit nil, nil is returned func (o *FlowLogs) GetItems() *[]FlowLog { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *FlowLogs) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *FlowLogs) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *FlowLogs) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogs) GetOffsetOk() (*float32, bool) { +func (o *FlowLogs) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *FlowLogs) SetOffset(v float32) { +// SetLimit sets field value +func (o *FlowLogs) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *FlowLogs) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *FlowLogs) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *FlowLogs) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *FlowLogs) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogs) GetLimitOk() (*float32, bool) { +func (o *FlowLogs) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *FlowLogs) SetLimit(v float32) { +// SetOffset sets field value +func (o *FlowLogs) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *FlowLogs) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *FlowLogs) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *FlowLogs) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *FlowLogs) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowLogs) GetLinksOk() (*PaginationLinks, bool) { +func (o *FlowLogs) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *FlowLogs) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *FlowLogs) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *FlowLogs) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *FlowLogs) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *FlowLogs) HasLinks() bool { func (o FlowLogs) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group.go index a1e9b6781a9c..1509dd460ded 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group.go @@ -16,14 +16,14 @@ import ( // Group struct for Group type Group struct { + Entities *GroupEntities `json:"entities,omitempty"` + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *GroupProperties `json:"properties"` // The type of the resource. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *GroupProperties `json:"properties"` - Entities *GroupEntities `json:"entities,omitempty"` } // NewGroup instantiates a new Group object @@ -46,114 +46,114 @@ func NewGroupWithDefaults() *Group { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Group) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Group) GetEntities() *GroupEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Group) GetIdOk() (*string, bool) { +func (o *Group) GetEntitiesOk() (*GroupEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Group) SetId(v string) { +// SetEntities sets field value +func (o *Group) SetEntities(v GroupEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Group) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Group) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Group) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Group) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Group) GetTypeOk() (*Type, bool) { +func (o *Group) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Group) SetType(v Type) { +// SetHref sets field value +func (o *Group) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Group) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Group) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Group) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Group) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Group) GetHrefOk() (*string, bool) { +func (o *Group) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Group) SetHref(v string) { +// SetId sets field value +func (o *Group) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Group) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Group) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -161,7 +161,7 @@ func (o *Group) HasHref() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for GroupProperties will be returned +// If the value is explicit nil, nil is returned func (o *Group) GetProperties() *GroupProperties { if o == nil { return nil @@ -198,38 +198,38 @@ func (o *Group) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for GroupEntities will be returned -func (o *Group) GetEntities() *GroupEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Group) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Group) GetEntitiesOk() (*GroupEntities, bool) { +func (o *Group) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Group) SetEntities(v GroupEntities) { +// SetType sets field value +func (o *Group) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Group) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Group) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Group) HasEntities() bool { func (o Group) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_entities.go index 067e84cac6db..f9e91462267f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_entities.go @@ -16,8 +16,8 @@ import ( // GroupEntities struct for GroupEntities type GroupEntities struct { - Users *GroupMembers `json:"users,omitempty"` Resources *ResourceGroups `json:"resources,omitempty"` + Users *GroupMembers `json:"users,omitempty"` } // NewGroupEntities instantiates a new GroupEntities object @@ -38,76 +38,76 @@ func NewGroupEntitiesWithDefaults() *GroupEntities { return &this } -// GetUsers returns the Users field value -// If the value is explicit nil, the zero value for GroupMembers will be returned -func (o *GroupEntities) GetUsers() *GroupMembers { +// GetResources returns the Resources field value +// If the value is explicit nil, nil is returned +func (o *GroupEntities) GetResources() *ResourceGroups { if o == nil { return nil } - return o.Users + return o.Resources } -// GetUsersOk returns a tuple with the Users field value +// GetResourcesOk returns a tuple with the Resources field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupEntities) GetUsersOk() (*GroupMembers, bool) { +func (o *GroupEntities) GetResourcesOk() (*ResourceGroups, bool) { if o == nil { return nil, false } - return o.Users, true + return o.Resources, true } -// SetUsers sets field value -func (o *GroupEntities) SetUsers(v GroupMembers) { +// SetResources sets field value +func (o *GroupEntities) SetResources(v ResourceGroups) { - o.Users = &v + o.Resources = &v } -// HasUsers returns a boolean if a field has been set. -func (o *GroupEntities) HasUsers() bool { - if o != nil && o.Users != nil { +// HasResources returns a boolean if a field has been set. +func (o *GroupEntities) HasResources() bool { + if o != nil && o.Resources != nil { return true } return false } -// GetResources returns the Resources field value -// If the value is explicit nil, the zero value for ResourceGroups will be returned -func (o *GroupEntities) GetResources() *ResourceGroups { +// GetUsers returns the Users field value +// If the value is explicit nil, nil is returned +func (o *GroupEntities) GetUsers() *GroupMembers { if o == nil { return nil } - return o.Resources + return o.Users } -// GetResourcesOk returns a tuple with the Resources field value +// GetUsersOk returns a tuple with the Users field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupEntities) GetResourcesOk() (*ResourceGroups, bool) { +func (o *GroupEntities) GetUsersOk() (*GroupMembers, bool) { if o == nil { return nil, false } - return o.Resources, true + return o.Users, true } -// SetResources sets field value -func (o *GroupEntities) SetResources(v ResourceGroups) { +// SetUsers sets field value +func (o *GroupEntities) SetUsers(v GroupMembers) { - o.Resources = &v + o.Users = &v } -// HasResources returns a boolean if a field has been set. -func (o *GroupEntities) HasResources() bool { - if o != nil && o.Resources != nil { +// HasUsers returns a boolean if a field has been set. +func (o *GroupEntities) HasUsers() bool { + if o != nil && o.Users != nil { return true } @@ -116,12 +116,14 @@ func (o *GroupEntities) HasResources() bool { func (o GroupEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Users != nil { - toSerialize["users"] = o.Users - } if o.Resources != nil { toSerialize["resources"] = o.Resources } + + if o.Users != nil { + toSerialize["users"] = o.Users + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_members.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_members.go index c38d7c018f7b..a4a750e784ed 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_members.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_members.go @@ -16,14 +16,14 @@ import ( // GroupMembers struct for GroupMembers type GroupMembers struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]User `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewGroupMembers instantiates a new GroupMembers object @@ -44,152 +44,152 @@ func NewGroupMembersWithDefaults() *GroupMembers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupMembers) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *GroupMembers) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupMembers) GetIdOk() (*string, bool) { +func (o *GroupMembers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *GroupMembers) SetId(v string) { +// SetHref sets field value +func (o *GroupMembers) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *GroupMembers) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *GroupMembers) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *GroupMembers) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *GroupMembers) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupMembers) GetTypeOk() (*Type, bool) { +func (o *GroupMembers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *GroupMembers) SetType(v Type) { +// SetId sets field value +func (o *GroupMembers) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *GroupMembers) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *GroupMembers) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupMembers) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *GroupMembers) GetItems() *[]User { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupMembers) GetHrefOk() (*string, bool) { +func (o *GroupMembers) GetItemsOk() (*[]User, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *GroupMembers) SetHref(v string) { +// SetItems sets field value +func (o *GroupMembers) SetItems(v []User) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *GroupMembers) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *GroupMembers) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []User will be returned -func (o *GroupMembers) GetItems() *[]User { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *GroupMembers) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupMembers) GetItemsOk() (*[]User, bool) { +func (o *GroupMembers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *GroupMembers) SetItems(v []User) { +// SetType sets field value +func (o *GroupMembers) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *GroupMembers) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *GroupMembers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *GroupMembers) HasItems() bool { func (o GroupMembers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_properties.go index a7f78f84c13d..d73cb668b84a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_properties.go @@ -16,32 +16,40 @@ import ( // GroupProperties struct for GroupProperties type GroupProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // Create data center privilege. - CreateDataCenter *bool `json:"createDataCenter,omitempty"` - // Create snapshot privilege. - CreateSnapshot *bool `json:"createSnapshot,omitempty"` - // Reserve IP block privilege. - ReserveIp *bool `json:"reserveIp,omitempty"` // Activity log access privilege. AccessActivityLog *bool `json:"accessActivityLog,omitempty"` - // Create pcc privilege. - CreatePcc *bool `json:"createPcc,omitempty"` - // S3 privilege. - S3Privilege *bool `json:"s3Privilege,omitempty"` + // Privilege for a group to access and manage certificates. + AccessAndManageCertificates *bool `json:"accessAndManageCertificates,omitempty"` + // Privilege for a group to access and manage dns records. + AccessAndManageDns *bool `json:"accessAndManageDns,omitempty"` + // Privilege for a group to access and manage monitoring related functionality (access metrics, CRUD on alarms, alarm-actions etc) using Monotoring-as-a-Service (MaaS). + AccessAndManageMonitoring *bool `json:"accessAndManageMonitoring,omitempty"` // Create backup unit privilege. CreateBackupUnit *bool `json:"createBackupUnit,omitempty"` + // Create data center privilege. + CreateDataCenter *bool `json:"createDataCenter,omitempty"` + // Create Flow Logs privilege. + CreateFlowLog *bool `json:"createFlowLog,omitempty"` // Create internet access privilege. CreateInternetAccess *bool `json:"createInternetAccess,omitempty"` // Create Kubernetes cluster privilege. CreateK8sCluster *bool `json:"createK8sCluster,omitempty"` - // Create Flow Logs privilege. - CreateFlowLog *bool `json:"createFlowLog,omitempty"` - // Privilege for a group to access and manage monitoring related functionality (access metrics, CRUD on alarms, alarm-actions etc) using Monotoring-as-a-Service (MaaS). - AccessAndManageMonitoring *bool `json:"accessAndManageMonitoring,omitempty"` - // Privilege for a group to access and manage certificates. - AccessAndManageCertificates *bool `json:"accessAndManageCertificates,omitempty"` + // Create pcc privilege. + CreatePcc *bool `json:"createPcc,omitempty"` + // Create snapshot privilege. + CreateSnapshot *bool `json:"createSnapshot,omitempty"` + // Privilege for a group to manage DBaaS related functionality. + ManageDBaaS *bool `json:"manageDBaaS,omitempty"` + // Privilege for a group to access and manage the Data Platform. + ManageDataplatform *bool `json:"manageDataplatform,omitempty"` + // Privilege for group accessing container registry related functionality. + ManageRegistry *bool `json:"manageRegistry,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` + // Reserve IP block privilege. + ReserveIp *bool `json:"reserveIp,omitempty"` + // S3 privilege. + S3Privilege *bool `json:"s3Privilege,omitempty"` } // NewGroupProperties instantiates a new GroupProperties object @@ -62,38 +70,190 @@ func NewGroupPropertiesWithDefaults() *GroupProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupProperties) GetName() *string { +// GetAccessActivityLog returns the AccessActivityLog field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetAccessActivityLog() *bool { if o == nil { return nil } - return o.Name + return o.AccessActivityLog } -// GetNameOk returns a tuple with the Name field value +// GetAccessActivityLogOk returns a tuple with the AccessActivityLog field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetNameOk() (*string, bool) { +func (o *GroupProperties) GetAccessActivityLogOk() (*bool, bool) { if o == nil { return nil, false } - return o.Name, true + return o.AccessActivityLog, true } -// SetName sets field value -func (o *GroupProperties) SetName(v string) { +// SetAccessActivityLog sets field value +func (o *GroupProperties) SetAccessActivityLog(v bool) { - o.Name = &v + o.AccessActivityLog = &v } -// HasName returns a boolean if a field has been set. -func (o *GroupProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasAccessActivityLog returns a boolean if a field has been set. +func (o *GroupProperties) HasAccessActivityLog() bool { + if o != nil && o.AccessActivityLog != nil { + return true + } + + return false +} + +// GetAccessAndManageCertificates returns the AccessAndManageCertificates field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetAccessAndManageCertificates() *bool { + if o == nil { + return nil + } + + return o.AccessAndManageCertificates + +} + +// GetAccessAndManageCertificatesOk returns a tuple with the AccessAndManageCertificates field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupProperties) GetAccessAndManageCertificatesOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.AccessAndManageCertificates, true +} + +// SetAccessAndManageCertificates sets field value +func (o *GroupProperties) SetAccessAndManageCertificates(v bool) { + + o.AccessAndManageCertificates = &v + +} + +// HasAccessAndManageCertificates returns a boolean if a field has been set. +func (o *GroupProperties) HasAccessAndManageCertificates() bool { + if o != nil && o.AccessAndManageCertificates != nil { + return true + } + + return false +} + +// GetAccessAndManageDns returns the AccessAndManageDns field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetAccessAndManageDns() *bool { + if o == nil { + return nil + } + + return o.AccessAndManageDns + +} + +// GetAccessAndManageDnsOk returns a tuple with the AccessAndManageDns field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupProperties) GetAccessAndManageDnsOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.AccessAndManageDns, true +} + +// SetAccessAndManageDns sets field value +func (o *GroupProperties) SetAccessAndManageDns(v bool) { + + o.AccessAndManageDns = &v + +} + +// HasAccessAndManageDns returns a boolean if a field has been set. +func (o *GroupProperties) HasAccessAndManageDns() bool { + if o != nil && o.AccessAndManageDns != nil { + return true + } + + return false +} + +// GetAccessAndManageMonitoring returns the AccessAndManageMonitoring field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetAccessAndManageMonitoring() *bool { + if o == nil { + return nil + } + + return o.AccessAndManageMonitoring + +} + +// GetAccessAndManageMonitoringOk returns a tuple with the AccessAndManageMonitoring field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupProperties) GetAccessAndManageMonitoringOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.AccessAndManageMonitoring, true +} + +// SetAccessAndManageMonitoring sets field value +func (o *GroupProperties) SetAccessAndManageMonitoring(v bool) { + + o.AccessAndManageMonitoring = &v + +} + +// HasAccessAndManageMonitoring returns a boolean if a field has been set. +func (o *GroupProperties) HasAccessAndManageMonitoring() bool { + if o != nil && o.AccessAndManageMonitoring != nil { + return true + } + + return false +} + +// GetCreateBackupUnit returns the CreateBackupUnit field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreateBackupUnit() *bool { + if o == nil { + return nil + } + + return o.CreateBackupUnit + +} + +// GetCreateBackupUnitOk returns a tuple with the CreateBackupUnit field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupProperties) GetCreateBackupUnitOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.CreateBackupUnit, true +} + +// SetCreateBackupUnit sets field value +func (o *GroupProperties) SetCreateBackupUnit(v bool) { + + o.CreateBackupUnit = &v + +} + +// HasCreateBackupUnit returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateBackupUnit() bool { + if o != nil && o.CreateBackupUnit != nil { return true } @@ -101,7 +261,7 @@ func (o *GroupProperties) HasName() bool { } // GetCreateDataCenter returns the CreateDataCenter field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateDataCenter() *bool { if o == nil { return nil @@ -138,114 +298,114 @@ func (o *GroupProperties) HasCreateDataCenter() bool { return false } -// GetCreateSnapshot returns the CreateSnapshot field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreateSnapshot() *bool { +// GetCreateFlowLog returns the CreateFlowLog field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreateFlowLog() *bool { if o == nil { return nil } - return o.CreateSnapshot + return o.CreateFlowLog } -// GetCreateSnapshotOk returns a tuple with the CreateSnapshot field value +// GetCreateFlowLogOk returns a tuple with the CreateFlowLog field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetCreateSnapshotOk() (*bool, bool) { +func (o *GroupProperties) GetCreateFlowLogOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateSnapshot, true + return o.CreateFlowLog, true } -// SetCreateSnapshot sets field value -func (o *GroupProperties) SetCreateSnapshot(v bool) { +// SetCreateFlowLog sets field value +func (o *GroupProperties) SetCreateFlowLog(v bool) { - o.CreateSnapshot = &v + o.CreateFlowLog = &v } -// HasCreateSnapshot returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateSnapshot() bool { - if o != nil && o.CreateSnapshot != nil { +// HasCreateFlowLog returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateFlowLog() bool { + if o != nil && o.CreateFlowLog != nil { return true } return false } -// GetReserveIp returns the ReserveIp field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetReserveIp() *bool { +// GetCreateInternetAccess returns the CreateInternetAccess field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreateInternetAccess() *bool { if o == nil { return nil } - return o.ReserveIp + return o.CreateInternetAccess } -// GetReserveIpOk returns a tuple with the ReserveIp field value +// GetCreateInternetAccessOk returns a tuple with the CreateInternetAccess field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetReserveIpOk() (*bool, bool) { +func (o *GroupProperties) GetCreateInternetAccessOk() (*bool, bool) { if o == nil { return nil, false } - return o.ReserveIp, true + return o.CreateInternetAccess, true } -// SetReserveIp sets field value -func (o *GroupProperties) SetReserveIp(v bool) { +// SetCreateInternetAccess sets field value +func (o *GroupProperties) SetCreateInternetAccess(v bool) { - o.ReserveIp = &v + o.CreateInternetAccess = &v } -// HasReserveIp returns a boolean if a field has been set. -func (o *GroupProperties) HasReserveIp() bool { - if o != nil && o.ReserveIp != nil { +// HasCreateInternetAccess returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateInternetAccess() bool { + if o != nil && o.CreateInternetAccess != nil { return true } return false } -// GetAccessActivityLog returns the AccessActivityLog field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetAccessActivityLog() *bool { +// GetCreateK8sCluster returns the CreateK8sCluster field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreateK8sCluster() *bool { if o == nil { return nil } - return o.AccessActivityLog + return o.CreateK8sCluster } -// GetAccessActivityLogOk returns a tuple with the AccessActivityLog field value +// GetCreateK8sClusterOk returns a tuple with the CreateK8sCluster field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetAccessActivityLogOk() (*bool, bool) { +func (o *GroupProperties) GetCreateK8sClusterOk() (*bool, bool) { if o == nil { return nil, false } - return o.AccessActivityLog, true + return o.CreateK8sCluster, true } -// SetAccessActivityLog sets field value -func (o *GroupProperties) SetAccessActivityLog(v bool) { +// SetCreateK8sCluster sets field value +func (o *GroupProperties) SetCreateK8sCluster(v bool) { - o.AccessActivityLog = &v + o.CreateK8sCluster = &v } -// HasAccessActivityLog returns a boolean if a field has been set. -func (o *GroupProperties) HasAccessActivityLog() bool { - if o != nil && o.AccessActivityLog != nil { +// HasCreateK8sCluster returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateK8sCluster() bool { + if o != nil && o.CreateK8sCluster != nil { return true } @@ -253,7 +413,7 @@ func (o *GroupProperties) HasAccessActivityLog() bool { } // GetCreatePcc returns the CreatePcc field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreatePcc() *bool { if o == nil { return nil @@ -290,266 +450,266 @@ func (o *GroupProperties) HasCreatePcc() bool { return false } -// GetS3Privilege returns the S3Privilege field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetS3Privilege() *bool { +// GetCreateSnapshot returns the CreateSnapshot field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreateSnapshot() *bool { if o == nil { return nil } - return o.S3Privilege + return o.CreateSnapshot } -// GetS3PrivilegeOk returns a tuple with the S3Privilege field value +// GetCreateSnapshotOk returns a tuple with the CreateSnapshot field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetS3PrivilegeOk() (*bool, bool) { +func (o *GroupProperties) GetCreateSnapshotOk() (*bool, bool) { if o == nil { return nil, false } - return o.S3Privilege, true + return o.CreateSnapshot, true } -// SetS3Privilege sets field value -func (o *GroupProperties) SetS3Privilege(v bool) { +// SetCreateSnapshot sets field value +func (o *GroupProperties) SetCreateSnapshot(v bool) { - o.S3Privilege = &v + o.CreateSnapshot = &v } -// HasS3Privilege returns a boolean if a field has been set. -func (o *GroupProperties) HasS3Privilege() bool { - if o != nil && o.S3Privilege != nil { +// HasCreateSnapshot returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateSnapshot() bool { + if o != nil && o.CreateSnapshot != nil { return true } return false } -// GetCreateBackupUnit returns the CreateBackupUnit field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreateBackupUnit() *bool { +// GetManageDBaaS returns the ManageDBaaS field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetManageDBaaS() *bool { if o == nil { return nil } - return o.CreateBackupUnit + return o.ManageDBaaS } -// GetCreateBackupUnitOk returns a tuple with the CreateBackupUnit field value +// GetManageDBaaSOk returns a tuple with the ManageDBaaS field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetCreateBackupUnitOk() (*bool, bool) { +func (o *GroupProperties) GetManageDBaaSOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateBackupUnit, true + return o.ManageDBaaS, true } -// SetCreateBackupUnit sets field value -func (o *GroupProperties) SetCreateBackupUnit(v bool) { +// SetManageDBaaS sets field value +func (o *GroupProperties) SetManageDBaaS(v bool) { - o.CreateBackupUnit = &v + o.ManageDBaaS = &v } -// HasCreateBackupUnit returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateBackupUnit() bool { - if o != nil && o.CreateBackupUnit != nil { +// HasManageDBaaS returns a boolean if a field has been set. +func (o *GroupProperties) HasManageDBaaS() bool { + if o != nil && o.ManageDBaaS != nil { return true } return false } -// GetCreateInternetAccess returns the CreateInternetAccess field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreateInternetAccess() *bool { +// GetManageDataplatform returns the ManageDataplatform field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetManageDataplatform() *bool { if o == nil { return nil } - return o.CreateInternetAccess + return o.ManageDataplatform } -// GetCreateInternetAccessOk returns a tuple with the CreateInternetAccess field value +// GetManageDataplatformOk returns a tuple with the ManageDataplatform field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetCreateInternetAccessOk() (*bool, bool) { +func (o *GroupProperties) GetManageDataplatformOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateInternetAccess, true + return o.ManageDataplatform, true } -// SetCreateInternetAccess sets field value -func (o *GroupProperties) SetCreateInternetAccess(v bool) { +// SetManageDataplatform sets field value +func (o *GroupProperties) SetManageDataplatform(v bool) { - o.CreateInternetAccess = &v + o.ManageDataplatform = &v } -// HasCreateInternetAccess returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateInternetAccess() bool { - if o != nil && o.CreateInternetAccess != nil { +// HasManageDataplatform returns a boolean if a field has been set. +func (o *GroupProperties) HasManageDataplatform() bool { + if o != nil && o.ManageDataplatform != nil { return true } return false } -// GetCreateK8sCluster returns the CreateK8sCluster field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreateK8sCluster() *bool { +// GetManageRegistry returns the ManageRegistry field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetManageRegistry() *bool { if o == nil { return nil } - return o.CreateK8sCluster + return o.ManageRegistry } -// GetCreateK8sClusterOk returns a tuple with the CreateK8sCluster field value +// GetManageRegistryOk returns a tuple with the ManageRegistry field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetCreateK8sClusterOk() (*bool, bool) { +func (o *GroupProperties) GetManageRegistryOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateK8sCluster, true + return o.ManageRegistry, true } -// SetCreateK8sCluster sets field value -func (o *GroupProperties) SetCreateK8sCluster(v bool) { +// SetManageRegistry sets field value +func (o *GroupProperties) SetManageRegistry(v bool) { - o.CreateK8sCluster = &v + o.ManageRegistry = &v } -// HasCreateK8sCluster returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateK8sCluster() bool { - if o != nil && o.CreateK8sCluster != nil { +// HasManageRegistry returns a boolean if a field has been set. +func (o *GroupProperties) HasManageRegistry() bool { + if o != nil && o.ManageRegistry != nil { return true } return false } -// GetCreateFlowLog returns the CreateFlowLog field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreateFlowLog() *bool { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetName() *string { if o == nil { return nil } - return o.CreateFlowLog + return o.Name } -// GetCreateFlowLogOk returns a tuple with the CreateFlowLog field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetCreateFlowLogOk() (*bool, bool) { +func (o *GroupProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.CreateFlowLog, true + return o.Name, true } -// SetCreateFlowLog sets field value -func (o *GroupProperties) SetCreateFlowLog(v bool) { +// SetName sets field value +func (o *GroupProperties) SetName(v string) { - o.CreateFlowLog = &v + o.Name = &v } -// HasCreateFlowLog returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateFlowLog() bool { - if o != nil && o.CreateFlowLog != nil { +// HasName returns a boolean if a field has been set. +func (o *GroupProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetAccessAndManageMonitoring returns the AccessAndManageMonitoring field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetAccessAndManageMonitoring() *bool { +// GetReserveIp returns the ReserveIp field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetReserveIp() *bool { if o == nil { return nil } - return o.AccessAndManageMonitoring + return o.ReserveIp } -// GetAccessAndManageMonitoringOk returns a tuple with the AccessAndManageMonitoring field value +// GetReserveIpOk returns a tuple with the ReserveIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetAccessAndManageMonitoringOk() (*bool, bool) { +func (o *GroupProperties) GetReserveIpOk() (*bool, bool) { if o == nil { return nil, false } - return o.AccessAndManageMonitoring, true + return o.ReserveIp, true } -// SetAccessAndManageMonitoring sets field value -func (o *GroupProperties) SetAccessAndManageMonitoring(v bool) { +// SetReserveIp sets field value +func (o *GroupProperties) SetReserveIp(v bool) { - o.AccessAndManageMonitoring = &v + o.ReserveIp = &v } -// HasAccessAndManageMonitoring returns a boolean if a field has been set. -func (o *GroupProperties) HasAccessAndManageMonitoring() bool { - if o != nil && o.AccessAndManageMonitoring != nil { +// HasReserveIp returns a boolean if a field has been set. +func (o *GroupProperties) HasReserveIp() bool { + if o != nil && o.ReserveIp != nil { return true } return false } -// GetAccessAndManageCertificates returns the AccessAndManageCertificates field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetAccessAndManageCertificates() *bool { +// GetS3Privilege returns the S3Privilege field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetS3Privilege() *bool { if o == nil { return nil } - return o.AccessAndManageCertificates + return o.S3Privilege } -// GetAccessAndManageCertificatesOk returns a tuple with the AccessAndManageCertificates field value +// GetS3PrivilegeOk returns a tuple with the S3Privilege field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupProperties) GetAccessAndManageCertificatesOk() (*bool, bool) { +func (o *GroupProperties) GetS3PrivilegeOk() (*bool, bool) { if o == nil { return nil, false } - return o.AccessAndManageCertificates, true + return o.S3Privilege, true } -// SetAccessAndManageCertificates sets field value -func (o *GroupProperties) SetAccessAndManageCertificates(v bool) { +// SetS3Privilege sets field value +func (o *GroupProperties) SetS3Privilege(v bool) { - o.AccessAndManageCertificates = &v + o.S3Privilege = &v } -// HasAccessAndManageCertificates returns a boolean if a field has been set. -func (o *GroupProperties) HasAccessAndManageCertificates() bool { - if o != nil && o.AccessAndManageCertificates != nil { +// HasS3Privilege returns a boolean if a field has been set. +func (o *GroupProperties) HasS3Privilege() bool { + if o != nil && o.S3Privilege != nil { return true } @@ -558,45 +718,74 @@ func (o *GroupProperties) HasAccessAndManageCertificates() bool { func (o GroupProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.CreateDataCenter != nil { - toSerialize["createDataCenter"] = o.CreateDataCenter - } - if o.CreateSnapshot != nil { - toSerialize["createSnapshot"] = o.CreateSnapshot - } - if o.ReserveIp != nil { - toSerialize["reserveIp"] = o.ReserveIp - } if o.AccessActivityLog != nil { toSerialize["accessActivityLog"] = o.AccessActivityLog } - if o.CreatePcc != nil { - toSerialize["createPcc"] = o.CreatePcc + + if o.AccessAndManageCertificates != nil { + toSerialize["accessAndManageCertificates"] = o.AccessAndManageCertificates } - if o.S3Privilege != nil { - toSerialize["s3Privilege"] = o.S3Privilege + + if o.AccessAndManageDns != nil { + toSerialize["accessAndManageDns"] = o.AccessAndManageDns } + + if o.AccessAndManageMonitoring != nil { + toSerialize["accessAndManageMonitoring"] = o.AccessAndManageMonitoring + } + if o.CreateBackupUnit != nil { toSerialize["createBackupUnit"] = o.CreateBackupUnit } + + if o.CreateDataCenter != nil { + toSerialize["createDataCenter"] = o.CreateDataCenter + } + + if o.CreateFlowLog != nil { + toSerialize["createFlowLog"] = o.CreateFlowLog + } + if o.CreateInternetAccess != nil { toSerialize["createInternetAccess"] = o.CreateInternetAccess } + if o.CreateK8sCluster != nil { toSerialize["createK8sCluster"] = o.CreateK8sCluster } - if o.CreateFlowLog != nil { - toSerialize["createFlowLog"] = o.CreateFlowLog + + if o.CreatePcc != nil { + toSerialize["createPcc"] = o.CreatePcc } - if o.AccessAndManageMonitoring != nil { - toSerialize["accessAndManageMonitoring"] = o.AccessAndManageMonitoring + + if o.CreateSnapshot != nil { + toSerialize["createSnapshot"] = o.CreateSnapshot } - if o.AccessAndManageCertificates != nil { - toSerialize["accessAndManageCertificates"] = o.AccessAndManageCertificates + + if o.ManageDBaaS != nil { + toSerialize["manageDBaaS"] = o.ManageDBaaS + } + + if o.ManageDataplatform != nil { + toSerialize["manageDataplatform"] = o.ManageDataplatform + } + + if o.ManageRegistry != nil { + toSerialize["manageRegistry"] = o.ManageRegistry + } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.ReserveIp != nil { + toSerialize["reserveIp"] = o.ReserveIp } + + if o.S3Privilege != nil { + toSerialize["s3Privilege"] = o.S3Privilege + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share.go index a25a874a3792..ae84478aa827 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share.go @@ -16,13 +16,13 @@ import ( // GroupShare struct for GroupShare type GroupShare struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *GroupShareProperties `json:"properties"` // resource as generic type Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *GroupShareProperties `json:"properties"` } // NewGroupShare instantiates a new GroupShare object @@ -45,152 +45,152 @@ func NewGroupShareWithDefaults() *GroupShare { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupShare) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *GroupShare) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShare) GetIdOk() (*string, bool) { +func (o *GroupShare) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *GroupShare) SetId(v string) { +// SetHref sets field value +func (o *GroupShare) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *GroupShare) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *GroupShare) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *GroupShare) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *GroupShare) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShare) GetTypeOk() (*Type, bool) { +func (o *GroupShare) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *GroupShare) SetType(v Type) { +// SetId sets field value +func (o *GroupShare) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *GroupShare) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *GroupShare) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupShare) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *GroupShare) GetProperties() *GroupShareProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShare) GetHrefOk() (*string, bool) { +func (o *GroupShare) GetPropertiesOk() (*GroupShareProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *GroupShare) SetHref(v string) { +// SetProperties sets field value +func (o *GroupShare) SetProperties(v GroupShareProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *GroupShare) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *GroupShare) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for GroupShareProperties will be returned -func (o *GroupShare) GetProperties() *GroupShareProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *GroupShare) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShare) GetPropertiesOk() (*GroupShareProperties, bool) { +func (o *GroupShare) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *GroupShare) SetProperties(v GroupShareProperties) { +// SetType sets field value +func (o *GroupShare) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *GroupShare) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *GroupShare) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *GroupShare) HasProperties() bool { func (o GroupShare) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share_properties.go index 5e356c127b1b..1ca06267f7cc 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_share_properties.go @@ -41,7 +41,7 @@ func NewGroupSharePropertiesWithDefaults() *GroupShareProperties { } // GetEditPrivilege returns the EditPrivilege field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *GroupShareProperties) GetEditPrivilege() *bool { if o == nil { return nil @@ -79,7 +79,7 @@ func (o *GroupShareProperties) HasEditPrivilege() bool { } // GetSharePrivilege returns the SharePrivilege field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *GroupShareProperties) GetSharePrivilege() *bool { if o == nil { return nil @@ -121,9 +121,11 @@ func (o GroupShareProperties) MarshalJSON() ([]byte, error) { if o.EditPrivilege != nil { toSerialize["editPrivilege"] = o.EditPrivilege } + if o.SharePrivilege != nil { toSerialize["sharePrivilege"] = o.SharePrivilege } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_shares.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_shares.go index 6735473c8729..091da39c5f2e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_shares.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_shares.go @@ -16,14 +16,14 @@ import ( // GroupShares struct for GroupShares type GroupShares struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // Share representing groups and resource relationship - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]GroupShare `json:"items,omitempty"` + // Share representing groups and resource relationship + Type *Type `json:"type,omitempty"` } // NewGroupShares instantiates a new GroupShares object @@ -44,152 +44,152 @@ func NewGroupSharesWithDefaults() *GroupShares { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupShares) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *GroupShares) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShares) GetIdOk() (*string, bool) { +func (o *GroupShares) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *GroupShares) SetId(v string) { +// SetHref sets field value +func (o *GroupShares) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *GroupShares) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *GroupShares) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *GroupShares) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *GroupShares) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShares) GetTypeOk() (*Type, bool) { +func (o *GroupShares) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *GroupShares) SetType(v Type) { +// SetId sets field value +func (o *GroupShares) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *GroupShares) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *GroupShares) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupShares) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *GroupShares) GetItems() *[]GroupShare { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShares) GetHrefOk() (*string, bool) { +func (o *GroupShares) GetItemsOk() (*[]GroupShare, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *GroupShares) SetHref(v string) { +// SetItems sets field value +func (o *GroupShares) SetItems(v []GroupShare) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *GroupShares) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *GroupShares) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []GroupShare will be returned -func (o *GroupShares) GetItems() *[]GroupShare { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *GroupShares) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupShares) GetItemsOk() (*[]GroupShare, bool) { +func (o *GroupShares) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *GroupShares) SetItems(v []GroupShare) { +// SetType sets field value +func (o *GroupShares) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *GroupShares) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *GroupShares) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *GroupShares) HasItems() bool { func (o GroupShares) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_users.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_users.go index a2fb51bc2bba..4a4f075c1ea7 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_users.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_group_users.go @@ -16,14 +16,14 @@ import ( // GroupUsers Collection of the groups the user is a member of. type GroupUsers struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Group `json:"items,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewGroupUsers instantiates a new GroupUsers object @@ -44,152 +44,152 @@ func NewGroupUsersWithDefaults() *GroupUsers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupUsers) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *GroupUsers) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupUsers) GetIdOk() (*string, bool) { +func (o *GroupUsers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *GroupUsers) SetId(v string) { +// SetHref sets field value +func (o *GroupUsers) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *GroupUsers) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *GroupUsers) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *GroupUsers) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *GroupUsers) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupUsers) GetTypeOk() (*Type, bool) { +func (o *GroupUsers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *GroupUsers) SetType(v Type) { +// SetId sets field value +func (o *GroupUsers) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *GroupUsers) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *GroupUsers) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *GroupUsers) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *GroupUsers) GetItems() *[]Group { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupUsers) GetHrefOk() (*string, bool) { +func (o *GroupUsers) GetItemsOk() (*[]Group, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *GroupUsers) SetHref(v string) { +// SetItems sets field value +func (o *GroupUsers) SetItems(v []Group) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *GroupUsers) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *GroupUsers) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Group will be returned -func (o *GroupUsers) GetItems() *[]Group { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *GroupUsers) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GroupUsers) GetItemsOk() (*[]Group, bool) { +func (o *GroupUsers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *GroupUsers) SetItems(v []Group) { +// SetType sets field value +func (o *GroupUsers) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *GroupUsers) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *GroupUsers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *GroupUsers) HasItems() bool { func (o GroupUsers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_groups.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_groups.go index 85df0a37de4d..578d27c1c907 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_groups.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_groups.go @@ -16,14 +16,14 @@ import ( // Groups struct for Groups type Groups struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Group `json:"items,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewGroups instantiates a new Groups object @@ -44,152 +44,152 @@ func NewGroupsWithDefaults() *Groups { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Groups) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Groups) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Groups) GetIdOk() (*string, bool) { +func (o *Groups) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Groups) SetId(v string) { +// SetHref sets field value +func (o *Groups) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Groups) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Groups) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Groups) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Groups) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Groups) GetTypeOk() (*Type, bool) { +func (o *Groups) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Groups) SetType(v Type) { +// SetId sets field value +func (o *Groups) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Groups) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Groups) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Groups) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Groups) GetItems() *[]Group { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Groups) GetHrefOk() (*string, bool) { +func (o *Groups) GetItemsOk() (*[]Group, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Groups) SetHref(v string) { +// SetItems sets field value +func (o *Groups) SetItems(v []Group) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Groups) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Groups) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Group will be returned -func (o *Groups) GetItems() *[]Group { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Groups) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Groups) GetItemsOk() (*[]Group, bool) { +func (o *Groups) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Groups) SetItems(v []Group) { +// SetType sets field value +func (o *Groups) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Groups) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Groups) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Groups) HasItems() bool { func (o Groups) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image.go index 747a0e9493cc..962c8e2e85cf 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image.go @@ -16,14 +16,14 @@ import ( // Image struct for Image type Image struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ImageProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewImage instantiates a new Image object @@ -46,190 +46,190 @@ func NewImageWithDefaults() *Image { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Image) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Image) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Image) GetIdOk() (*string, bool) { +func (o *Image) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Image) SetId(v string) { +// SetHref sets field value +func (o *Image) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Image) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Image) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Image) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Image) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Image) GetTypeOk() (*Type, bool) { +func (o *Image) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Image) SetType(v Type) { +// SetId sets field value +func (o *Image) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Image) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Image) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Image) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Image) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Image) GetHrefOk() (*string, bool) { +func (o *Image) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Image) SetHref(v string) { +// SetMetadata sets field value +func (o *Image) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Image) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Image) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *Image) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Image) GetProperties() *ImageProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Image) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *Image) GetPropertiesOk() (*ImageProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Image) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *Image) SetProperties(v ImageProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Image) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Image) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ImageProperties will be returned -func (o *Image) GetProperties() *ImageProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Image) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Image) GetPropertiesOk() (*ImageProperties, bool) { +func (o *Image) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Image) SetProperties(v ImageProperties) { +// SetType sets field value +func (o *Image) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Image) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Image) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Image) HasProperties() bool { func (o Image) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image_properties.go index 94cc7e9bacfe..f6059779e409 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_image_properties.go @@ -16,44 +16,44 @@ import ( // ImageProperties struct for ImageProperties type ImageProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // Human-readable description. - Description *string `json:"description,omitempty"` - // Location of that image/snapshot. - Location *string `json:"location,omitempty"` - // The size of the image in GB. - Size *float32 `json:"size,omitempty"` + // Cloud init compatibility. + CloudInit *string `json:"cloudInit,omitempty"` // Hot-plug capable CPU (no reboot required). CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` // Hot-unplug capable CPU (no reboot required). CpuHotUnplug *bool `json:"cpuHotUnplug,omitempty"` - // Hot-plug capable RAM (no reboot required). - RamHotPlug *bool `json:"ramHotPlug,omitempty"` - // Hot-unplug capable RAM (no reboot required). - RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` - // Hot-plug capable NIC (no reboot required). - NicHotPlug *bool `json:"nicHotPlug,omitempty"` - // Hot-unplug capable NIC (no reboot required). - NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` - // Hot-plug capable Virt-IO drive (no reboot required). - DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` - // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. - DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` + // Human-readable description. + Description *string `json:"description,omitempty"` // Hot-plug capable SCSI drive (no reboot required). DiscScsiHotPlug *bool `json:"discScsiHotPlug,omitempty"` // Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs. DiscScsiHotUnplug *bool `json:"discScsiHotUnplug,omitempty"` - // OS type for this image. - LicenceType *string `json:"licenceType"` + // Hot-plug capable Virt-IO drive (no reboot required). + DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` + // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. + DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` + // List of image aliases mapped for this image + ImageAliases *[]string `json:"imageAliases,omitempty"` // The image type. ImageType *string `json:"imageType,omitempty"` + // The OS type of this image. + LicenceType *string `json:"licenceType"` + // The location of this image/snapshot. + Location *string `json:"location,omitempty"` + // The resource name. + Name *string `json:"name,omitempty"` + // Hot-plug capable NIC (no reboot required). + NicHotPlug *bool `json:"nicHotPlug,omitempty"` + // Hot-unplug capable NIC (no reboot required). + NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` // Indicates whether the image is part of a public repository. Public *bool `json:"public,omitempty"` - // List of image aliases mapped for this Image - ImageAliases *[]string `json:"imageAliases,omitempty"` - // Cloud init compatibility. - CloudInit *string `json:"cloudInit,omitempty"` + // Hot-plug capable RAM (no reboot required). + RamHotPlug *bool `json:"ramHotPlug,omitempty"` + // Hot-unplug capable RAM (no reboot required). + RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` + // The image size in GB. + Size *float32 `json:"size,omitempty"` } // NewImageProperties instantiates a new ImageProperties object @@ -76,722 +76,722 @@ func NewImagePropertiesWithDefaults() *ImageProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ImageProperties) GetName() *string { +// GetCloudInit returns the CloudInit field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetCloudInit() *string { if o == nil { return nil } - return o.Name + return o.CloudInit } -// GetNameOk returns a tuple with the Name field value +// GetCloudInitOk returns a tuple with the CloudInit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetNameOk() (*string, bool) { +func (o *ImageProperties) GetCloudInitOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.CloudInit, true } -// SetName sets field value -func (o *ImageProperties) SetName(v string) { +// SetCloudInit sets field value +func (o *ImageProperties) SetCloudInit(v string) { - o.Name = &v + o.CloudInit = &v } -// HasName returns a boolean if a field has been set. -func (o *ImageProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasCloudInit returns a boolean if a field has been set. +func (o *ImageProperties) HasCloudInit() bool { + if o != nil && o.CloudInit != nil { return true } return false } -// GetDescription returns the Description field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ImageProperties) GetDescription() *string { +// GetCpuHotPlug returns the CpuHotPlug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetCpuHotPlug() *bool { if o == nil { return nil } - return o.Description + return o.CpuHotPlug } -// GetDescriptionOk returns a tuple with the Description field value +// GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetDescriptionOk() (*string, bool) { +func (o *ImageProperties) GetCpuHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Description, true + return o.CpuHotPlug, true } -// SetDescription sets field value -func (o *ImageProperties) SetDescription(v string) { +// SetCpuHotPlug sets field value +func (o *ImageProperties) SetCpuHotPlug(v bool) { - o.Description = &v + o.CpuHotPlug = &v } -// HasDescription returns a boolean if a field has been set. -func (o *ImageProperties) HasDescription() bool { - if o != nil && o.Description != nil { +// HasCpuHotPlug returns a boolean if a field has been set. +func (o *ImageProperties) HasCpuHotPlug() bool { + if o != nil && o.CpuHotPlug != nil { return true } return false } -// GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ImageProperties) GetLocation() *string { +// GetCpuHotUnplug returns the CpuHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetCpuHotUnplug() *bool { if o == nil { return nil } - return o.Location + return o.CpuHotUnplug } -// GetLocationOk returns a tuple with the Location field value +// GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetLocationOk() (*string, bool) { +func (o *ImageProperties) GetCpuHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Location, true + return o.CpuHotUnplug, true } -// SetLocation sets field value -func (o *ImageProperties) SetLocation(v string) { +// SetCpuHotUnplug sets field value +func (o *ImageProperties) SetCpuHotUnplug(v bool) { - o.Location = &v + o.CpuHotUnplug = &v } -// HasLocation returns a boolean if a field has been set. -func (o *ImageProperties) HasLocation() bool { - if o != nil && o.Location != nil { +// HasCpuHotUnplug returns a boolean if a field has been set. +func (o *ImageProperties) HasCpuHotUnplug() bool { + if o != nil && o.CpuHotUnplug != nil { return true } return false } -// GetSize returns the Size field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *ImageProperties) GetSize() *float32 { +// GetDescription returns the Description field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetDescription() *string { if o == nil { return nil } - return o.Size + return o.Description } -// GetSizeOk returns a tuple with the Size field value +// GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetSizeOk() (*float32, bool) { +func (o *ImageProperties) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } - return o.Size, true + return o.Description, true } -// SetSize sets field value -func (o *ImageProperties) SetSize(v float32) { +// SetDescription sets field value +func (o *ImageProperties) SetDescription(v string) { - o.Size = &v + o.Description = &v } -// HasSize returns a boolean if a field has been set. -func (o *ImageProperties) HasSize() bool { - if o != nil && o.Size != nil { +// HasDescription returns a boolean if a field has been set. +func (o *ImageProperties) HasDescription() bool { + if o != nil && o.Description != nil { return true } return false } -// GetCpuHotPlug returns the CpuHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetCpuHotPlug() *bool { +// GetDiscScsiHotPlug returns the DiscScsiHotPlug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetDiscScsiHotPlug() *bool { if o == nil { return nil } - return o.CpuHotPlug + return o.DiscScsiHotPlug } -// GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value +// GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetCpuHotPlugOk() (*bool, bool) { +func (o *ImageProperties) GetDiscScsiHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.CpuHotPlug, true + return o.DiscScsiHotPlug, true } -// SetCpuHotPlug sets field value -func (o *ImageProperties) SetCpuHotPlug(v bool) { +// SetDiscScsiHotPlug sets field value +func (o *ImageProperties) SetDiscScsiHotPlug(v bool) { - o.CpuHotPlug = &v + o.DiscScsiHotPlug = &v } -// HasCpuHotPlug returns a boolean if a field has been set. -func (o *ImageProperties) HasCpuHotPlug() bool { - if o != nil && o.CpuHotPlug != nil { +// HasDiscScsiHotPlug returns a boolean if a field has been set. +func (o *ImageProperties) HasDiscScsiHotPlug() bool { + if o != nil && o.DiscScsiHotPlug != nil { return true } return false } -// GetCpuHotUnplug returns the CpuHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetCpuHotUnplug() *bool { +// GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetDiscScsiHotUnplug() *bool { if o == nil { return nil } - return o.CpuHotUnplug + return o.DiscScsiHotUnplug } -// GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value +// GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetCpuHotUnplugOk() (*bool, bool) { +func (o *ImageProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.CpuHotUnplug, true + return o.DiscScsiHotUnplug, true } -// SetCpuHotUnplug sets field value -func (o *ImageProperties) SetCpuHotUnplug(v bool) { +// SetDiscScsiHotUnplug sets field value +func (o *ImageProperties) SetDiscScsiHotUnplug(v bool) { - o.CpuHotUnplug = &v + o.DiscScsiHotUnplug = &v } -// HasCpuHotUnplug returns a boolean if a field has been set. -func (o *ImageProperties) HasCpuHotUnplug() bool { - if o != nil && o.CpuHotUnplug != nil { +// HasDiscScsiHotUnplug returns a boolean if a field has been set. +func (o *ImageProperties) HasDiscScsiHotUnplug() bool { + if o != nil && o.DiscScsiHotUnplug != nil { return true } return false } -// GetRamHotPlug returns the RamHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetRamHotPlug() *bool { +// GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetDiscVirtioHotPlug() *bool { if o == nil { return nil } - return o.RamHotPlug + return o.DiscVirtioHotPlug } -// GetRamHotPlugOk returns a tuple with the RamHotPlug field value +// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetRamHotPlugOk() (*bool, bool) { +func (o *ImageProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.RamHotPlug, true + return o.DiscVirtioHotPlug, true } -// SetRamHotPlug sets field value -func (o *ImageProperties) SetRamHotPlug(v bool) { +// SetDiscVirtioHotPlug sets field value +func (o *ImageProperties) SetDiscVirtioHotPlug(v bool) { - o.RamHotPlug = &v + o.DiscVirtioHotPlug = &v } -// HasRamHotPlug returns a boolean if a field has been set. -func (o *ImageProperties) HasRamHotPlug() bool { - if o != nil && o.RamHotPlug != nil { +// HasDiscVirtioHotPlug returns a boolean if a field has been set. +func (o *ImageProperties) HasDiscVirtioHotPlug() bool { + if o != nil && o.DiscVirtioHotPlug != nil { return true } return false } -// GetRamHotUnplug returns the RamHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetRamHotUnplug() *bool { +// GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetDiscVirtioHotUnplug() *bool { if o == nil { return nil } - return o.RamHotUnplug + return o.DiscVirtioHotUnplug } -// GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value +// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetRamHotUnplugOk() (*bool, bool) { +func (o *ImageProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.RamHotUnplug, true + return o.DiscVirtioHotUnplug, true } -// SetRamHotUnplug sets field value -func (o *ImageProperties) SetRamHotUnplug(v bool) { +// SetDiscVirtioHotUnplug sets field value +func (o *ImageProperties) SetDiscVirtioHotUnplug(v bool) { - o.RamHotUnplug = &v + o.DiscVirtioHotUnplug = &v } -// HasRamHotUnplug returns a boolean if a field has been set. -func (o *ImageProperties) HasRamHotUnplug() bool { - if o != nil && o.RamHotUnplug != nil { +// HasDiscVirtioHotUnplug returns a boolean if a field has been set. +func (o *ImageProperties) HasDiscVirtioHotUnplug() bool { + if o != nil && o.DiscVirtioHotUnplug != nil { return true } return false } -// GetNicHotPlug returns the NicHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetNicHotPlug() *bool { +// GetImageAliases returns the ImageAliases field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetImageAliases() *[]string { if o == nil { return nil } - return o.NicHotPlug + return o.ImageAliases } -// GetNicHotPlugOk returns a tuple with the NicHotPlug field value +// GetImageAliasesOk returns a tuple with the ImageAliases field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetNicHotPlugOk() (*bool, bool) { +func (o *ImageProperties) GetImageAliasesOk() (*[]string, bool) { if o == nil { return nil, false } - return o.NicHotPlug, true + return o.ImageAliases, true } -// SetNicHotPlug sets field value -func (o *ImageProperties) SetNicHotPlug(v bool) { +// SetImageAliases sets field value +func (o *ImageProperties) SetImageAliases(v []string) { - o.NicHotPlug = &v + o.ImageAliases = &v } -// HasNicHotPlug returns a boolean if a field has been set. -func (o *ImageProperties) HasNicHotPlug() bool { - if o != nil && o.NicHotPlug != nil { - return true +// HasImageAliases returns a boolean if a field has been set. +func (o *ImageProperties) HasImageAliases() bool { + if o != nil && o.ImageAliases != nil { + return true } return false } -// GetNicHotUnplug returns the NicHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetNicHotUnplug() *bool { +// GetImageType returns the ImageType field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetImageType() *string { if o == nil { return nil } - return o.NicHotUnplug + return o.ImageType } -// GetNicHotUnplugOk returns a tuple with the NicHotUnplug field value +// GetImageTypeOk returns a tuple with the ImageType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetNicHotUnplugOk() (*bool, bool) { +func (o *ImageProperties) GetImageTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.NicHotUnplug, true + return o.ImageType, true } -// SetNicHotUnplug sets field value -func (o *ImageProperties) SetNicHotUnplug(v bool) { +// SetImageType sets field value +func (o *ImageProperties) SetImageType(v string) { - o.NicHotUnplug = &v + o.ImageType = &v } -// HasNicHotUnplug returns a boolean if a field has been set. -func (o *ImageProperties) HasNicHotUnplug() bool { - if o != nil && o.NicHotUnplug != nil { +// HasImageType returns a boolean if a field has been set. +func (o *ImageProperties) HasImageType() bool { + if o != nil && o.ImageType != nil { return true } return false } -// GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetDiscVirtioHotPlug() *bool { +// GetLicenceType returns the LicenceType field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetLicenceType() *string { if o == nil { return nil } - return o.DiscVirtioHotPlug + return o.LicenceType } -// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value +// GetLicenceTypeOk returns a tuple with the LicenceType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { +func (o *ImageProperties) GetLicenceTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotPlug, true + return o.LicenceType, true } -// SetDiscVirtioHotPlug sets field value -func (o *ImageProperties) SetDiscVirtioHotPlug(v bool) { +// SetLicenceType sets field value +func (o *ImageProperties) SetLicenceType(v string) { - o.DiscVirtioHotPlug = &v + o.LicenceType = &v } -// HasDiscVirtioHotPlug returns a boolean if a field has been set. -func (o *ImageProperties) HasDiscVirtioHotPlug() bool { - if o != nil && o.DiscVirtioHotPlug != nil { +// HasLicenceType returns a boolean if a field has been set. +func (o *ImageProperties) HasLicenceType() bool { + if o != nil && o.LicenceType != nil { return true } return false } -// GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetDiscVirtioHotUnplug() *bool { +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetLocation() *string { if o == nil { return nil } - return o.DiscVirtioHotUnplug + return o.Location } -// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value +// GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { +func (o *ImageProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotUnplug, true + return o.Location, true } -// SetDiscVirtioHotUnplug sets field value -func (o *ImageProperties) SetDiscVirtioHotUnplug(v bool) { +// SetLocation sets field value +func (o *ImageProperties) SetLocation(v string) { - o.DiscVirtioHotUnplug = &v + o.Location = &v } -// HasDiscVirtioHotUnplug returns a boolean if a field has been set. -func (o *ImageProperties) HasDiscVirtioHotUnplug() bool { - if o != nil && o.DiscVirtioHotUnplug != nil { +// HasLocation returns a boolean if a field has been set. +func (o *ImageProperties) HasLocation() bool { + if o != nil && o.Location != nil { return true } return false } -// GetDiscScsiHotPlug returns the DiscScsiHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetDiscScsiHotPlug() *bool { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetName() *string { if o == nil { return nil } - return o.DiscScsiHotPlug + return o.Name } -// GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetDiscScsiHotPlugOk() (*bool, bool) { +func (o *ImageProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.DiscScsiHotPlug, true + return o.Name, true } -// SetDiscScsiHotPlug sets field value -func (o *ImageProperties) SetDiscScsiHotPlug(v bool) { +// SetName sets field value +func (o *ImageProperties) SetName(v string) { - o.DiscScsiHotPlug = &v + o.Name = &v } -// HasDiscScsiHotPlug returns a boolean if a field has been set. -func (o *ImageProperties) HasDiscScsiHotPlug() bool { - if o != nil && o.DiscScsiHotPlug != nil { +// HasName returns a boolean if a field has been set. +func (o *ImageProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetDiscScsiHotUnplug() *bool { +// GetNicHotPlug returns the NicHotPlug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetNicHotPlug() *bool { if o == nil { return nil } - return o.DiscScsiHotUnplug + return o.NicHotPlug } -// GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value +// GetNicHotPlugOk returns a tuple with the NicHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { +func (o *ImageProperties) GetNicHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscScsiHotUnplug, true + return o.NicHotPlug, true } -// SetDiscScsiHotUnplug sets field value -func (o *ImageProperties) SetDiscScsiHotUnplug(v bool) { +// SetNicHotPlug sets field value +func (o *ImageProperties) SetNicHotPlug(v bool) { - o.DiscScsiHotUnplug = &v + o.NicHotPlug = &v } -// HasDiscScsiHotUnplug returns a boolean if a field has been set. -func (o *ImageProperties) HasDiscScsiHotUnplug() bool { - if o != nil && o.DiscScsiHotUnplug != nil { +// HasNicHotPlug returns a boolean if a field has been set. +func (o *ImageProperties) HasNicHotPlug() bool { + if o != nil && o.NicHotPlug != nil { return true } return false } -// GetLicenceType returns the LicenceType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ImageProperties) GetLicenceType() *string { +// GetNicHotUnplug returns the NicHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetNicHotUnplug() *bool { if o == nil { return nil } - return o.LicenceType + return o.NicHotUnplug } -// GetLicenceTypeOk returns a tuple with the LicenceType field value +// GetNicHotUnplugOk returns a tuple with the NicHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetLicenceTypeOk() (*string, bool) { +func (o *ImageProperties) GetNicHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.LicenceType, true + return o.NicHotUnplug, true } -// SetLicenceType sets field value -func (o *ImageProperties) SetLicenceType(v string) { +// SetNicHotUnplug sets field value +func (o *ImageProperties) SetNicHotUnplug(v bool) { - o.LicenceType = &v + o.NicHotUnplug = &v } -// HasLicenceType returns a boolean if a field has been set. -func (o *ImageProperties) HasLicenceType() bool { - if o != nil && o.LicenceType != nil { +// HasNicHotUnplug returns a boolean if a field has been set. +func (o *ImageProperties) HasNicHotUnplug() bool { + if o != nil && o.NicHotUnplug != nil { return true } return false } -// GetImageType returns the ImageType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ImageProperties) GetImageType() *string { +// GetPublic returns the Public field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetPublic() *bool { if o == nil { return nil } - return o.ImageType + return o.Public } -// GetImageTypeOk returns a tuple with the ImageType field value +// GetPublicOk returns a tuple with the Public field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetImageTypeOk() (*string, bool) { +func (o *ImageProperties) GetPublicOk() (*bool, bool) { if o == nil { return nil, false } - return o.ImageType, true + return o.Public, true } -// SetImageType sets field value -func (o *ImageProperties) SetImageType(v string) { +// SetPublic sets field value +func (o *ImageProperties) SetPublic(v bool) { - o.ImageType = &v + o.Public = &v } -// HasImageType returns a boolean if a field has been set. -func (o *ImageProperties) HasImageType() bool { - if o != nil && o.ImageType != nil { +// HasPublic returns a boolean if a field has been set. +func (o *ImageProperties) HasPublic() bool { + if o != nil && o.Public != nil { return true } return false } -// GetPublic returns the Public field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *ImageProperties) GetPublic() *bool { +// GetRamHotPlug returns the RamHotPlug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetRamHotPlug() *bool { if o == nil { return nil } - return o.Public + return o.RamHotPlug } -// GetPublicOk returns a tuple with the Public field value +// GetRamHotPlugOk returns a tuple with the RamHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetPublicOk() (*bool, bool) { +func (o *ImageProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Public, true + return o.RamHotPlug, true } -// SetPublic sets field value -func (o *ImageProperties) SetPublic(v bool) { +// SetRamHotPlug sets field value +func (o *ImageProperties) SetRamHotPlug(v bool) { - o.Public = &v + o.RamHotPlug = &v } -// HasPublic returns a boolean if a field has been set. -func (o *ImageProperties) HasPublic() bool { - if o != nil && o.Public != nil { +// HasRamHotPlug returns a boolean if a field has been set. +func (o *ImageProperties) HasRamHotPlug() bool { + if o != nil && o.RamHotPlug != nil { return true } return false } -// GetImageAliases returns the ImageAliases field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *ImageProperties) GetImageAliases() *[]string { +// GetRamHotUnplug returns the RamHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetRamHotUnplug() *bool { if o == nil { return nil } - return o.ImageAliases + return o.RamHotUnplug } -// GetImageAliasesOk returns a tuple with the ImageAliases field value +// GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetImageAliasesOk() (*[]string, bool) { +func (o *ImageProperties) GetRamHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.ImageAliases, true + return o.RamHotUnplug, true } -// SetImageAliases sets field value -func (o *ImageProperties) SetImageAliases(v []string) { +// SetRamHotUnplug sets field value +func (o *ImageProperties) SetRamHotUnplug(v bool) { - o.ImageAliases = &v + o.RamHotUnplug = &v } -// HasImageAliases returns a boolean if a field has been set. -func (o *ImageProperties) HasImageAliases() bool { - if o != nil && o.ImageAliases != nil { +// HasRamHotUnplug returns a boolean if a field has been set. +func (o *ImageProperties) HasRamHotUnplug() bool { + if o != nil && o.RamHotUnplug != nil { return true } return false } -// GetCloudInit returns the CloudInit field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ImageProperties) GetCloudInit() *string { +// GetSize returns the Size field value +// If the value is explicit nil, nil is returned +func (o *ImageProperties) GetSize() *float32 { if o == nil { return nil } - return o.CloudInit + return o.Size } -// GetCloudInitOk returns a tuple with the CloudInit field value +// GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ImageProperties) GetCloudInitOk() (*string, bool) { +func (o *ImageProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } - return o.CloudInit, true + return o.Size, true } -// SetCloudInit sets field value -func (o *ImageProperties) SetCloudInit(v string) { +// SetSize sets field value +func (o *ImageProperties) SetSize(v float32) { - o.CloudInit = &v + o.Size = &v } -// HasCloudInit returns a boolean if a field has been set. -func (o *ImageProperties) HasCloudInit() bool { - if o != nil && o.CloudInit != nil { +// HasSize returns a boolean if a field has been set. +func (o *ImageProperties) HasSize() bool { + if o != nil && o.Size != nil { return true } @@ -800,63 +800,82 @@ func (o *ImageProperties) HasCloudInit() bool { func (o ImageProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Location != nil { - toSerialize["location"] = o.Location - } - if o.Size != nil { - toSerialize["size"] = o.Size + if o.CloudInit != nil { + toSerialize["cloudInit"] = o.CloudInit } + if o.CpuHotPlug != nil { toSerialize["cpuHotPlug"] = o.CpuHotPlug } + if o.CpuHotUnplug != nil { toSerialize["cpuHotUnplug"] = o.CpuHotUnplug } - if o.RamHotPlug != nil { - toSerialize["ramHotPlug"] = o.RamHotPlug - } - if o.RamHotUnplug != nil { - toSerialize["ramHotUnplug"] = o.RamHotUnplug + + if o.Description != nil { + toSerialize["description"] = o.Description } - if o.NicHotPlug != nil { - toSerialize["nicHotPlug"] = o.NicHotPlug + + if o.DiscScsiHotPlug != nil { + toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug } - if o.NicHotUnplug != nil { - toSerialize["nicHotUnplug"] = o.NicHotUnplug + + if o.DiscScsiHotUnplug != nil { + toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug } + if o.DiscVirtioHotPlug != nil { toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug } + if o.DiscVirtioHotUnplug != nil { toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug } - if o.DiscScsiHotPlug != nil { - toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug + + if o.ImageAliases != nil { + toSerialize["imageAliases"] = o.ImageAliases } - if o.DiscScsiHotUnplug != nil { - toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug + + if o.ImageType != nil { + toSerialize["imageType"] = o.ImageType } + if o.LicenceType != nil { toSerialize["licenceType"] = o.LicenceType } - if o.ImageType != nil { - toSerialize["imageType"] = o.ImageType + + if o.Location != nil { + toSerialize["location"] = o.Location + } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.NicHotPlug != nil { + toSerialize["nicHotPlug"] = o.NicHotPlug } + + if o.NicHotUnplug != nil { + toSerialize["nicHotUnplug"] = o.NicHotUnplug + } + if o.Public != nil { toSerialize["public"] = o.Public } - if o.ImageAliases != nil { - toSerialize["imageAliases"] = o.ImageAliases + + if o.RamHotPlug != nil { + toSerialize["ramHotPlug"] = o.RamHotPlug } - if o.CloudInit != nil { - toSerialize["cloudInit"] = o.CloudInit + + if o.RamHotUnplug != nil { + toSerialize["ramHotUnplug"] = o.RamHotUnplug } + + if o.Size != nil { + toSerialize["size"] = o.Size + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_images.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_images.go index 42276184cf8b..1cec4020e6e2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_images.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_images.go @@ -16,14 +16,14 @@ import ( // Images struct for Images type Images struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Image `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewImages instantiates a new Images object @@ -44,152 +44,152 @@ func NewImagesWithDefaults() *Images { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Images) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Images) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Images) GetIdOk() (*string, bool) { +func (o *Images) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Images) SetId(v string) { +// SetHref sets field value +func (o *Images) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Images) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Images) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Images) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Images) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Images) GetTypeOk() (*Type, bool) { +func (o *Images) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Images) SetType(v Type) { +// SetId sets field value +func (o *Images) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Images) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Images) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Images) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Images) GetItems() *[]Image { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Images) GetHrefOk() (*string, bool) { +func (o *Images) GetItemsOk() (*[]Image, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Images) SetHref(v string) { +// SetItems sets field value +func (o *Images) SetItems(v []Image) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Images) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Images) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Image will be returned -func (o *Images) GetItems() *[]Image { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Images) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Images) GetItemsOk() (*[]Image, bool) { +func (o *Images) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Images) SetItems(v []Image) { +// SetType sets field value +func (o *Images) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Images) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Images) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Images) HasItems() bool { func (o Images) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_info.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_info.go index 123accc0b853..2ada276b5794 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_info.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_info.go @@ -16,11 +16,11 @@ import ( // Info struct for Info type Info struct { - // API entry point + // The API entry point. Href *string `json:"href,omitempty"` - // Name of the API + // The API name. Name *string `json:"name,omitempty"` - // Version of the API + // The API version. Version *string `json:"version,omitempty"` } @@ -43,7 +43,7 @@ func NewInfoWithDefaults() *Info { } // GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *Info) GetHref() *string { if o == nil { return nil @@ -81,7 +81,7 @@ func (o *Info) HasHref() bool { } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *Info) GetName() *string { if o == nil { return nil @@ -119,7 +119,7 @@ func (o *Info) HasName() bool { } // GetVersion returns the Version field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *Info) GetVersion() *string { if o == nil { return nil @@ -161,12 +161,15 @@ func (o Info) MarshalJSON() ([]byte, error) { if o.Href != nil { toSerialize["href"] = o.Href } + if o.Name != nil { toSerialize["name"] = o.Name } + if o.Version != nil { toSerialize["version"] = o.Version } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block.go index af07f6fb18fb..c7e16a0f215c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block.go @@ -16,14 +16,14 @@ import ( // IpBlock struct for IpBlock type IpBlock struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *IpBlockProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewIpBlock instantiates a new IpBlock object @@ -46,190 +46,190 @@ func NewIpBlockWithDefaults() *IpBlock { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpBlock) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *IpBlock) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlock) GetIdOk() (*string, bool) { +func (o *IpBlock) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *IpBlock) SetId(v string) { +// SetHref sets field value +func (o *IpBlock) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *IpBlock) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *IpBlock) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *IpBlock) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *IpBlock) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlock) GetTypeOk() (*Type, bool) { +func (o *IpBlock) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *IpBlock) SetType(v Type) { +// SetId sets field value +func (o *IpBlock) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *IpBlock) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *IpBlock) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpBlock) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *IpBlock) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlock) GetHrefOk() (*string, bool) { +func (o *IpBlock) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *IpBlock) SetHref(v string) { +// SetMetadata sets field value +func (o *IpBlock) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *IpBlock) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *IpBlock) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *IpBlock) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *IpBlock) GetProperties() *IpBlockProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlock) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *IpBlock) GetPropertiesOk() (*IpBlockProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *IpBlock) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *IpBlock) SetProperties(v IpBlockProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *IpBlock) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *IpBlock) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for IpBlockProperties will be returned -func (o *IpBlock) GetProperties() *IpBlockProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *IpBlock) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlock) GetPropertiesOk() (*IpBlockProperties, bool) { +func (o *IpBlock) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *IpBlock) SetProperties(v IpBlockProperties) { +// SetType sets field value +func (o *IpBlock) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *IpBlock) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *IpBlock) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *IpBlock) HasProperties() bool { func (o IpBlock) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block_properties.go index 4f732b53b2a7..19c3ed757348 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_block_properties.go @@ -16,16 +16,16 @@ import ( // IpBlockProperties struct for IpBlockProperties type IpBlockProperties struct { + // Read-Only attribute. Lists consumption detail for an individual IP + IpConsumers *[]IpConsumer `json:"ipConsumers,omitempty"` // Collection of IPs, associated with the IP Block. Ips *[]string `json:"ips,omitempty"` // Location of that IP block. Property cannot be modified after it is created (disallowed in update requests). Location *string `json:"location"` - // The size of the IP block. - Size *int32 `json:"size"` // The name of the resource. Name *string `json:"name,omitempty"` - // Read-Only attribute. Lists consumption detail for an individual IP - IpConsumers *[]IpConsumer `json:"ipConsumers,omitempty"` + // The size of the IP block. + Size *int32 `json:"size"` } // NewIpBlockProperties instantiates a new IpBlockProperties object @@ -49,114 +49,114 @@ func NewIpBlockPropertiesWithDefaults() *IpBlockProperties { return &this } -// GetIps returns the Ips field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *IpBlockProperties) GetIps() *[]string { +// GetIpConsumers returns the IpConsumers field value +// If the value is explicit nil, nil is returned +func (o *IpBlockProperties) GetIpConsumers() *[]IpConsumer { if o == nil { return nil } - return o.Ips + return o.IpConsumers } -// GetIpsOk returns a tuple with the Ips field value +// GetIpConsumersOk returns a tuple with the IpConsumers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlockProperties) GetIpsOk() (*[]string, bool) { +func (o *IpBlockProperties) GetIpConsumersOk() (*[]IpConsumer, bool) { if o == nil { return nil, false } - return o.Ips, true + return o.IpConsumers, true } -// SetIps sets field value -func (o *IpBlockProperties) SetIps(v []string) { +// SetIpConsumers sets field value +func (o *IpBlockProperties) SetIpConsumers(v []IpConsumer) { - o.Ips = &v + o.IpConsumers = &v } -// HasIps returns a boolean if a field has been set. -func (o *IpBlockProperties) HasIps() bool { - if o != nil && o.Ips != nil { +// HasIpConsumers returns a boolean if a field has been set. +func (o *IpBlockProperties) HasIpConsumers() bool { + if o != nil && o.IpConsumers != nil { return true } return false } -// GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpBlockProperties) GetLocation() *string { +// GetIps returns the Ips field value +// If the value is explicit nil, nil is returned +func (o *IpBlockProperties) GetIps() *[]string { if o == nil { return nil } - return o.Location + return o.Ips } -// GetLocationOk returns a tuple with the Location field value +// GetIpsOk returns a tuple with the Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlockProperties) GetLocationOk() (*string, bool) { +func (o *IpBlockProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Location, true + return o.Ips, true } -// SetLocation sets field value -func (o *IpBlockProperties) SetLocation(v string) { +// SetIps sets field value +func (o *IpBlockProperties) SetIps(v []string) { - o.Location = &v + o.Ips = &v } -// HasLocation returns a boolean if a field has been set. -func (o *IpBlockProperties) HasLocation() bool { - if o != nil && o.Location != nil { +// HasIps returns a boolean if a field has been set. +func (o *IpBlockProperties) HasIps() bool { + if o != nil && o.Ips != nil { return true } return false } -// GetSize returns the Size field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *IpBlockProperties) GetSize() *int32 { +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *IpBlockProperties) GetLocation() *string { if o == nil { return nil } - return o.Size + return o.Location } -// GetSizeOk returns a tuple with the Size field value +// GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlockProperties) GetSizeOk() (*int32, bool) { +func (o *IpBlockProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - return o.Size, true + return o.Location, true } -// SetSize sets field value -func (o *IpBlockProperties) SetSize(v int32) { +// SetLocation sets field value +func (o *IpBlockProperties) SetLocation(v string) { - o.Size = &v + o.Location = &v } -// HasSize returns a boolean if a field has been set. -func (o *IpBlockProperties) HasSize() bool { - if o != nil && o.Size != nil { +// HasLocation returns a boolean if a field has been set. +func (o *IpBlockProperties) HasLocation() bool { + if o != nil && o.Location != nil { return true } @@ -164,7 +164,7 @@ func (o *IpBlockProperties) HasSize() bool { } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *IpBlockProperties) GetName() *string { if o == nil { return nil @@ -201,38 +201,38 @@ func (o *IpBlockProperties) HasName() bool { return false } -// GetIpConsumers returns the IpConsumers field value -// If the value is explicit nil, the zero value for []IpConsumer will be returned -func (o *IpBlockProperties) GetIpConsumers() *[]IpConsumer { +// GetSize returns the Size field value +// If the value is explicit nil, nil is returned +func (o *IpBlockProperties) GetSize() *int32 { if o == nil { return nil } - return o.IpConsumers + return o.Size } -// GetIpConsumersOk returns a tuple with the IpConsumers field value +// GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlockProperties) GetIpConsumersOk() (*[]IpConsumer, bool) { +func (o *IpBlockProperties) GetSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.IpConsumers, true + return o.Size, true } -// SetIpConsumers sets field value -func (o *IpBlockProperties) SetIpConsumers(v []IpConsumer) { +// SetSize sets field value +func (o *IpBlockProperties) SetSize(v int32) { - o.IpConsumers = &v + o.Size = &v } -// HasIpConsumers returns a boolean if a field has been set. -func (o *IpBlockProperties) HasIpConsumers() bool { - if o != nil && o.IpConsumers != nil { +// HasSize returns a boolean if a field has been set. +func (o *IpBlockProperties) HasSize() bool { + if o != nil && o.Size != nil { return true } @@ -241,21 +241,26 @@ func (o *IpBlockProperties) HasIpConsumers() bool { func (o IpBlockProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.IpConsumers != nil { + toSerialize["ipConsumers"] = o.IpConsumers + } + if o.Ips != nil { toSerialize["ips"] = o.Ips } + if o.Location != nil { toSerialize["location"] = o.Location } - if o.Size != nil { - toSerialize["size"] = o.Size - } + if o.Name != nil { toSerialize["name"] = o.Name } - if o.IpConsumers != nil { - toSerialize["ipConsumers"] = o.IpConsumers + + if o.Size != nil { + toSerialize["size"] = o.Size } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_blocks.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_blocks.go index 010dc17fea08..117235c82c83 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_blocks.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_blocks.go @@ -16,19 +16,19 @@ import ( // IpBlocks struct for IpBlocks type IpBlocks struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]IpBlock `json:"items,omitempty"` + // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). + Limit *float32 `json:"limit,omitempty"` // The offset, specified in the request (if not is specified, 0 is used by default). Offset *float32 `json:"offset,omitempty"` - // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewIpBlocks instantiates a new IpBlocks object @@ -49,114 +49,114 @@ func NewIpBlocksWithDefaults() *IpBlocks { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpBlocks) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *IpBlocks) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlocks) GetIdOk() (*string, bool) { +func (o *IpBlocks) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *IpBlocks) SetId(v string) { +// SetLinks sets field value +func (o *IpBlocks) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *IpBlocks) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *IpBlocks) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *IpBlocks) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *IpBlocks) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlocks) GetTypeOk() (*Type, bool) { +func (o *IpBlocks) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *IpBlocks) SetType(v Type) { +// SetHref sets field value +func (o *IpBlocks) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *IpBlocks) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *IpBlocks) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpBlocks) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *IpBlocks) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlocks) GetHrefOk() (*string, bool) { +func (o *IpBlocks) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *IpBlocks) SetHref(v string) { +// SetId sets field value +func (o *IpBlocks) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *IpBlocks) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *IpBlocks) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *IpBlocks) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []IpBlock will be returned +// If the value is explicit nil, nil is returned func (o *IpBlocks) GetItems() *[]IpBlock { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *IpBlocks) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *IpBlocks) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *IpBlocks) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlocks) GetOffsetOk() (*float32, bool) { +func (o *IpBlocks) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *IpBlocks) SetOffset(v float32) { +// SetLimit sets field value +func (o *IpBlocks) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *IpBlocks) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *IpBlocks) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *IpBlocks) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *IpBlocks) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlocks) GetLimitOk() (*float32, bool) { +func (o *IpBlocks) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *IpBlocks) SetLimit(v float32) { +// SetOffset sets field value +func (o *IpBlocks) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *IpBlocks) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *IpBlocks) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *IpBlocks) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *IpBlocks) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpBlocks) GetLinksOk() (*PaginationLinks, bool) { +func (o *IpBlocks) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *IpBlocks) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *IpBlocks) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *IpBlocks) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *IpBlocks) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *IpBlocks) HasLinks() bool { func (o IpBlocks) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_consumer.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_consumer.go index a0e9e55c6d78..e405979fe2bc 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_consumer.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_consumer.go @@ -16,15 +16,15 @@ import ( // IpConsumer struct for IpConsumer type IpConsumer struct { + DatacenterId *string `json:"datacenterId,omitempty"` + DatacenterName *string `json:"datacenterName,omitempty"` Ip *string `json:"ip,omitempty"` + K8sClusterUuid *string `json:"k8sClusterUuid,omitempty"` + K8sNodePoolUuid *string `json:"k8sNodePoolUuid,omitempty"` Mac *string `json:"mac,omitempty"` NicId *string `json:"nicId,omitempty"` ServerId *string `json:"serverId,omitempty"` ServerName *string `json:"serverName,omitempty"` - DatacenterId *string `json:"datacenterId,omitempty"` - DatacenterName *string `json:"datacenterName,omitempty"` - K8sNodePoolUuid *string `json:"k8sNodePoolUuid,omitempty"` - K8sClusterUuid *string `json:"k8sClusterUuid,omitempty"` } // NewIpConsumer instantiates a new IpConsumer object @@ -45,342 +45,342 @@ func NewIpConsumerWithDefaults() *IpConsumer { return &this } -// GetIp returns the Ip field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetIp() *string { +// GetDatacenterId returns the DatacenterId field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetDatacenterId() *string { if o == nil { return nil } - return o.Ip + return o.DatacenterId } -// GetIpOk returns a tuple with the Ip field value +// GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetIpOk() (*string, bool) { +func (o *IpConsumer) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Ip, true + return o.DatacenterId, true } -// SetIp sets field value -func (o *IpConsumer) SetIp(v string) { +// SetDatacenterId sets field value +func (o *IpConsumer) SetDatacenterId(v string) { - o.Ip = &v + o.DatacenterId = &v } -// HasIp returns a boolean if a field has been set. -func (o *IpConsumer) HasIp() bool { - if o != nil && o.Ip != nil { +// HasDatacenterId returns a boolean if a field has been set. +func (o *IpConsumer) HasDatacenterId() bool { + if o != nil && o.DatacenterId != nil { return true } return false } -// GetMac returns the Mac field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetMac() *string { +// GetDatacenterName returns the DatacenterName field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetDatacenterName() *string { if o == nil { return nil } - return o.Mac + return o.DatacenterName } -// GetMacOk returns a tuple with the Mac field value +// GetDatacenterNameOk returns a tuple with the DatacenterName field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetMacOk() (*string, bool) { +func (o *IpConsumer) GetDatacenterNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Mac, true + return o.DatacenterName, true } -// SetMac sets field value -func (o *IpConsumer) SetMac(v string) { +// SetDatacenterName sets field value +func (o *IpConsumer) SetDatacenterName(v string) { - o.Mac = &v + o.DatacenterName = &v } -// HasMac returns a boolean if a field has been set. -func (o *IpConsumer) HasMac() bool { - if o != nil && o.Mac != nil { +// HasDatacenterName returns a boolean if a field has been set. +func (o *IpConsumer) HasDatacenterName() bool { + if o != nil && o.DatacenterName != nil { return true } return false } -// GetNicId returns the NicId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetNicId() *string { +// GetIp returns the Ip field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetIp() *string { if o == nil { return nil } - return o.NicId + return o.Ip } -// GetNicIdOk returns a tuple with the NicId field value +// GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetNicIdOk() (*string, bool) { +func (o *IpConsumer) GetIpOk() (*string, bool) { if o == nil { return nil, false } - return o.NicId, true + return o.Ip, true } -// SetNicId sets field value -func (o *IpConsumer) SetNicId(v string) { +// SetIp sets field value +func (o *IpConsumer) SetIp(v string) { - o.NicId = &v + o.Ip = &v } -// HasNicId returns a boolean if a field has been set. -func (o *IpConsumer) HasNicId() bool { - if o != nil && o.NicId != nil { +// HasIp returns a boolean if a field has been set. +func (o *IpConsumer) HasIp() bool { + if o != nil && o.Ip != nil { return true } return false } -// GetServerId returns the ServerId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetServerId() *string { +// GetK8sClusterUuid returns the K8sClusterUuid field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetK8sClusterUuid() *string { if o == nil { return nil } - return o.ServerId + return o.K8sClusterUuid } -// GetServerIdOk returns a tuple with the ServerId field value +// GetK8sClusterUuidOk returns a tuple with the K8sClusterUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetServerIdOk() (*string, bool) { +func (o *IpConsumer) GetK8sClusterUuidOk() (*string, bool) { if o == nil { return nil, false } - return o.ServerId, true + return o.K8sClusterUuid, true } -// SetServerId sets field value -func (o *IpConsumer) SetServerId(v string) { +// SetK8sClusterUuid sets field value +func (o *IpConsumer) SetK8sClusterUuid(v string) { - o.ServerId = &v + o.K8sClusterUuid = &v } -// HasServerId returns a boolean if a field has been set. -func (o *IpConsumer) HasServerId() bool { - if o != nil && o.ServerId != nil { +// HasK8sClusterUuid returns a boolean if a field has been set. +func (o *IpConsumer) HasK8sClusterUuid() bool { + if o != nil && o.K8sClusterUuid != nil { return true } return false } -// GetServerName returns the ServerName field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetServerName() *string { +// GetK8sNodePoolUuid returns the K8sNodePoolUuid field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetK8sNodePoolUuid() *string { if o == nil { return nil } - return o.ServerName + return o.K8sNodePoolUuid } -// GetServerNameOk returns a tuple with the ServerName field value +// GetK8sNodePoolUuidOk returns a tuple with the K8sNodePoolUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetServerNameOk() (*string, bool) { +func (o *IpConsumer) GetK8sNodePoolUuidOk() (*string, bool) { if o == nil { return nil, false } - return o.ServerName, true + return o.K8sNodePoolUuid, true } -// SetServerName sets field value -func (o *IpConsumer) SetServerName(v string) { +// SetK8sNodePoolUuid sets field value +func (o *IpConsumer) SetK8sNodePoolUuid(v string) { - o.ServerName = &v + o.K8sNodePoolUuid = &v } -// HasServerName returns a boolean if a field has been set. -func (o *IpConsumer) HasServerName() bool { - if o != nil && o.ServerName != nil { +// HasK8sNodePoolUuid returns a boolean if a field has been set. +func (o *IpConsumer) HasK8sNodePoolUuid() bool { + if o != nil && o.K8sNodePoolUuid != nil { return true } return false } -// GetDatacenterId returns the DatacenterId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetDatacenterId() *string { +// GetMac returns the Mac field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetMac() *string { if o == nil { return nil } - return o.DatacenterId + return o.Mac } -// GetDatacenterIdOk returns a tuple with the DatacenterId field value +// GetMacOk returns a tuple with the Mac field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetDatacenterIdOk() (*string, bool) { +func (o *IpConsumer) GetMacOk() (*string, bool) { if o == nil { return nil, false } - return o.DatacenterId, true + return o.Mac, true } -// SetDatacenterId sets field value -func (o *IpConsumer) SetDatacenterId(v string) { +// SetMac sets field value +func (o *IpConsumer) SetMac(v string) { - o.DatacenterId = &v + o.Mac = &v } -// HasDatacenterId returns a boolean if a field has been set. -func (o *IpConsumer) HasDatacenterId() bool { - if o != nil && o.DatacenterId != nil { +// HasMac returns a boolean if a field has been set. +func (o *IpConsumer) HasMac() bool { + if o != nil && o.Mac != nil { return true } return false } -// GetDatacenterName returns the DatacenterName field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetDatacenterName() *string { +// GetNicId returns the NicId field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetNicId() *string { if o == nil { return nil } - return o.DatacenterName + return o.NicId } -// GetDatacenterNameOk returns a tuple with the DatacenterName field value +// GetNicIdOk returns a tuple with the NicId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetDatacenterNameOk() (*string, bool) { +func (o *IpConsumer) GetNicIdOk() (*string, bool) { if o == nil { return nil, false } - return o.DatacenterName, true + return o.NicId, true } -// SetDatacenterName sets field value -func (o *IpConsumer) SetDatacenterName(v string) { +// SetNicId sets field value +func (o *IpConsumer) SetNicId(v string) { - o.DatacenterName = &v + o.NicId = &v } -// HasDatacenterName returns a boolean if a field has been set. -func (o *IpConsumer) HasDatacenterName() bool { - if o != nil && o.DatacenterName != nil { +// HasNicId returns a boolean if a field has been set. +func (o *IpConsumer) HasNicId() bool { + if o != nil && o.NicId != nil { return true } return false } -// GetK8sNodePoolUuid returns the K8sNodePoolUuid field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetK8sNodePoolUuid() *string { +// GetServerId returns the ServerId field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetServerId() *string { if o == nil { return nil } - return o.K8sNodePoolUuid + return o.ServerId } -// GetK8sNodePoolUuidOk returns a tuple with the K8sNodePoolUuid field value +// GetServerIdOk returns a tuple with the ServerId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetK8sNodePoolUuidOk() (*string, bool) { +func (o *IpConsumer) GetServerIdOk() (*string, bool) { if o == nil { return nil, false } - return o.K8sNodePoolUuid, true + return o.ServerId, true } -// SetK8sNodePoolUuid sets field value -func (o *IpConsumer) SetK8sNodePoolUuid(v string) { +// SetServerId sets field value +func (o *IpConsumer) SetServerId(v string) { - o.K8sNodePoolUuid = &v + o.ServerId = &v } -// HasK8sNodePoolUuid returns a boolean if a field has been set. -func (o *IpConsumer) HasK8sNodePoolUuid() bool { - if o != nil && o.K8sNodePoolUuid != nil { +// HasServerId returns a boolean if a field has been set. +func (o *IpConsumer) HasServerId() bool { + if o != nil && o.ServerId != nil { return true } return false } -// GetK8sClusterUuid returns the K8sClusterUuid field value -// If the value is explicit nil, the zero value for string will be returned -func (o *IpConsumer) GetK8sClusterUuid() *string { +// GetServerName returns the ServerName field value +// If the value is explicit nil, nil is returned +func (o *IpConsumer) GetServerName() *string { if o == nil { return nil } - return o.K8sClusterUuid + return o.ServerName } -// GetK8sClusterUuidOk returns a tuple with the K8sClusterUuid field value +// GetServerNameOk returns a tuple with the ServerName field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *IpConsumer) GetK8sClusterUuidOk() (*string, bool) { +func (o *IpConsumer) GetServerNameOk() (*string, bool) { if o == nil { return nil, false } - return o.K8sClusterUuid, true + return o.ServerName, true } -// SetK8sClusterUuid sets field value -func (o *IpConsumer) SetK8sClusterUuid(v string) { +// SetServerName sets field value +func (o *IpConsumer) SetServerName(v string) { - o.K8sClusterUuid = &v + o.ServerName = &v } -// HasK8sClusterUuid returns a boolean if a field has been set. -func (o *IpConsumer) HasK8sClusterUuid() bool { - if o != nil && o.K8sClusterUuid != nil { +// HasServerName returns a boolean if a field has been set. +func (o *IpConsumer) HasServerName() bool { + if o != nil && o.ServerName != nil { return true } @@ -389,33 +389,42 @@ func (o *IpConsumer) HasK8sClusterUuid() bool { func (o IpConsumer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.DatacenterId != nil { + toSerialize["datacenterId"] = o.DatacenterId + } + + if o.DatacenterName != nil { + toSerialize["datacenterName"] = o.DatacenterName + } + if o.Ip != nil { toSerialize["ip"] = o.Ip } + + if o.K8sClusterUuid != nil { + toSerialize["k8sClusterUuid"] = o.K8sClusterUuid + } + + if o.K8sNodePoolUuid != nil { + toSerialize["k8sNodePoolUuid"] = o.K8sNodePoolUuid + } + if o.Mac != nil { toSerialize["mac"] = o.Mac } + if o.NicId != nil { toSerialize["nicId"] = o.NicId } + if o.ServerId != nil { toSerialize["serverId"] = o.ServerId } + if o.ServerName != nil { toSerialize["serverName"] = o.ServerName } - if o.DatacenterId != nil { - toSerialize["datacenterId"] = o.DatacenterId - } - if o.DatacenterName != nil { - toSerialize["datacenterName"] = o.DatacenterName - } - if o.K8sNodePoolUuid != nil { - toSerialize["k8sNodePoolUuid"] = o.K8sNodePoolUuid - } - if o.K8sClusterUuid != nil { - toSerialize["k8sClusterUuid"] = o.K8sClusterUuid - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_failover.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_failover.go index 16677e73e1a9..60c902a97dc8 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_failover.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_ip_failover.go @@ -39,7 +39,7 @@ func NewIPFailoverWithDefaults() *IPFailover { } // GetIp returns the Ip field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *IPFailover) GetIp() *string { if o == nil { return nil @@ -77,7 +77,7 @@ func (o *IPFailover) HasIp() bool { } // GetNicUuid returns the NicUuid field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *IPFailover) GetNicUuid() *string { if o == nil { return nil @@ -119,9 +119,11 @@ func (o IPFailover) MarshalJSON() ([]byte, error) { if o.Ip != nil { toSerialize["ip"] = o.Ip } + if o.NicUuid != nil { toSerialize["nicUuid"] = o.NicUuid } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_auto_scaling.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_auto_scaling.go index 6ba3b8fde10e..49d9b3e86424 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_auto_scaling.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_auto_scaling.go @@ -16,21 +16,21 @@ import ( // KubernetesAutoScaling struct for KubernetesAutoScaling type KubernetesAutoScaling struct { - // The minimum number of worker nodes that the managed node group can scale in. Should be set together with 'maxNodeCount'. Value for this attribute must be greater than equal to 1 and less than equal to maxNodeCount. - MinNodeCount *int32 `json:"minNodeCount"` - // The maximum number of worker nodes that the managed node pool can scale-out. Should be set together with 'minNodeCount'. Value for this attribute must be greater than equal to 1 and minNodeCount. + // The maximum number of worker nodes that the managed node pool can scale in. Must be >= minNodeCount and must be >= nodeCount. Required if autoScaling is specified. MaxNodeCount *int32 `json:"maxNodeCount"` + // The minimum number of working nodes that the managed node pool can scale must be >= 1 and >= nodeCount. Required if autoScaling is specified. + MinNodeCount *int32 `json:"minNodeCount"` } // NewKubernetesAutoScaling instantiates a new KubernetesAutoScaling 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 NewKubernetesAutoScaling(minNodeCount int32, maxNodeCount int32) *KubernetesAutoScaling { +func NewKubernetesAutoScaling(maxNodeCount int32, minNodeCount int32) *KubernetesAutoScaling { this := KubernetesAutoScaling{} - this.MinNodeCount = &minNodeCount this.MaxNodeCount = &maxNodeCount + this.MinNodeCount = &minNodeCount return &this } @@ -43,76 +43,76 @@ func NewKubernetesAutoScalingWithDefaults() *KubernetesAutoScaling { return &this } -// GetMinNodeCount returns the MinNodeCount field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesAutoScaling) GetMinNodeCount() *int32 { +// GetMaxNodeCount returns the MaxNodeCount field value +// If the value is explicit nil, nil is returned +func (o *KubernetesAutoScaling) GetMaxNodeCount() *int32 { if o == nil { return nil } - return o.MinNodeCount + return o.MaxNodeCount } -// GetMinNodeCountOk returns a tuple with the MinNodeCount field value +// GetMaxNodeCountOk returns a tuple with the MaxNodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesAutoScaling) GetMinNodeCountOk() (*int32, bool) { +func (o *KubernetesAutoScaling) GetMaxNodeCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.MinNodeCount, true + return o.MaxNodeCount, true } -// SetMinNodeCount sets field value -func (o *KubernetesAutoScaling) SetMinNodeCount(v int32) { +// SetMaxNodeCount sets field value +func (o *KubernetesAutoScaling) SetMaxNodeCount(v int32) { - o.MinNodeCount = &v + o.MaxNodeCount = &v } -// HasMinNodeCount returns a boolean if a field has been set. -func (o *KubernetesAutoScaling) HasMinNodeCount() bool { - if o != nil && o.MinNodeCount != nil { +// HasMaxNodeCount returns a boolean if a field has been set. +func (o *KubernetesAutoScaling) HasMaxNodeCount() bool { + if o != nil && o.MaxNodeCount != nil { return true } return false } -// GetMaxNodeCount returns the MaxNodeCount field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesAutoScaling) GetMaxNodeCount() *int32 { +// GetMinNodeCount returns the MinNodeCount field value +// If the value is explicit nil, nil is returned +func (o *KubernetesAutoScaling) GetMinNodeCount() *int32 { if o == nil { return nil } - return o.MaxNodeCount + return o.MinNodeCount } -// GetMaxNodeCountOk returns a tuple with the MaxNodeCount field value +// GetMinNodeCountOk returns a tuple with the MinNodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesAutoScaling) GetMaxNodeCountOk() (*int32, bool) { +func (o *KubernetesAutoScaling) GetMinNodeCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.MaxNodeCount, true + return o.MinNodeCount, true } -// SetMaxNodeCount sets field value -func (o *KubernetesAutoScaling) SetMaxNodeCount(v int32) { +// SetMinNodeCount sets field value +func (o *KubernetesAutoScaling) SetMinNodeCount(v int32) { - o.MaxNodeCount = &v + o.MinNodeCount = &v } -// HasMaxNodeCount returns a boolean if a field has been set. -func (o *KubernetesAutoScaling) HasMaxNodeCount() bool { - if o != nil && o.MaxNodeCount != nil { +// HasMinNodeCount returns a boolean if a field has been set. +func (o *KubernetesAutoScaling) HasMinNodeCount() bool { + if o != nil && o.MinNodeCount != nil { return true } @@ -121,12 +121,14 @@ func (o *KubernetesAutoScaling) HasMaxNodeCount() bool { func (o KubernetesAutoScaling) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.MinNodeCount != nil { - toSerialize["minNodeCount"] = o.MinNodeCount - } if o.MaxNodeCount != nil { toSerialize["maxNodeCount"] = o.MaxNodeCount } + + if o.MinNodeCount != nil { + toSerialize["minNodeCount"] = o.MinNodeCount + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster.go index 8931a1643bd9..994a6ac2849b 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster.go @@ -16,15 +16,15 @@ import ( // KubernetesCluster struct for KubernetesCluster type KubernetesCluster struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Entities *KubernetesClusterEntities `json:"entities,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesClusterProperties `json:"properties"` - Entities *KubernetesClusterEntities `json:"entities,omitempty"` + // The object type. + Type *string `json:"type,omitempty"` } // NewKubernetesCluster instantiates a new KubernetesCluster object @@ -47,114 +47,114 @@ func NewKubernetesClusterWithDefaults() *KubernetesCluster { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesCluster) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *KubernetesCluster) GetEntities() *KubernetesClusterEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesCluster) GetIdOk() (*string, bool) { +func (o *KubernetesCluster) GetEntitiesOk() (*KubernetesClusterEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *KubernetesCluster) SetId(v string) { +// SetEntities sets field value +func (o *KubernetesCluster) SetEntities(v KubernetesClusterEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesCluster) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *KubernetesCluster) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesCluster) GetType() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesCluster) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesCluster) GetTypeOk() (*string, bool) { +func (o *KubernetesCluster) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *KubernetesCluster) SetType(v string) { +// SetHref sets field value +func (o *KubernetesCluster) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesCluster) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesCluster) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesCluster) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesCluster) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesCluster) GetHrefOk() (*string, bool) { +func (o *KubernetesCluster) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *KubernetesCluster) SetHref(v string) { +// SetId sets field value +func (o *KubernetesCluster) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesCluster) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesCluster) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *KubernetesCluster) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *KubernetesCluster) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesClusterProperties will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetProperties() *KubernetesClusterProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *KubernetesCluster) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for KubernetesClusterEntities will be returned -func (o *KubernetesCluster) GetEntities() *KubernetesClusterEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesCluster) GetType() *string { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesCluster) GetEntitiesOk() (*KubernetesClusterEntities, bool) { +func (o *KubernetesCluster) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *KubernetesCluster) SetEntities(v KubernetesClusterEntities) { +// SetType sets field value +func (o *KubernetesCluster) SetType(v string) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *KubernetesCluster) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesCluster) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *KubernetesCluster) HasEntities() bool { func (o KubernetesCluster) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_entities.go index 3e5dbaf4dbe4..0e7daca34656 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_entities.go @@ -38,7 +38,7 @@ func NewKubernetesClusterEntitiesWithDefaults() *KubernetesClusterEntities { } // GetNodepools returns the Nodepools field value -// If the value is explicit nil, the zero value for KubernetesNodePools will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterEntities) GetNodepools() *KubernetesNodePools { if o == nil { return nil @@ -80,6 +80,7 @@ func (o KubernetesClusterEntities) MarshalJSON() ([]byte, error) { if o.Nodepools != nil { toSerialize["nodepools"] = o.Nodepools } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_post.go index 8f375515a0a5..cf2d02e62096 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_post.go @@ -16,15 +16,15 @@ import ( // KubernetesClusterForPost struct for KubernetesClusterForPost type KubernetesClusterForPost struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Entities *KubernetesClusterEntities `json:"entities,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesClusterPropertiesForPost `json:"properties"` - Entities *KubernetesClusterEntities `json:"entities,omitempty"` + // The object type. + Type *string `json:"type,omitempty"` } // NewKubernetesClusterForPost instantiates a new KubernetesClusterForPost object @@ -47,114 +47,114 @@ func NewKubernetesClusterForPostWithDefaults() *KubernetesClusterForPost { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterForPost) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPost) GetEntities() *KubernetesClusterEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPost) GetIdOk() (*string, bool) { +func (o *KubernetesClusterForPost) GetEntitiesOk() (*KubernetesClusterEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *KubernetesClusterForPost) SetId(v string) { +// SetEntities sets field value +func (o *KubernetesClusterForPost) SetEntities(v KubernetesClusterEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesClusterForPost) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *KubernetesClusterForPost) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterForPost) GetType() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPost) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPost) GetTypeOk() (*string, bool) { +func (o *KubernetesClusterForPost) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *KubernetesClusterForPost) SetType(v string) { +// SetHref sets field value +func (o *KubernetesClusterForPost) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesClusterForPost) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesClusterForPost) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterForPost) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPost) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPost) GetHrefOk() (*string, bool) { +func (o *KubernetesClusterForPost) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *KubernetesClusterForPost) SetHref(v string) { +// SetId sets field value +func (o *KubernetesClusterForPost) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesClusterForPost) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesClusterForPost) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *KubernetesClusterForPost) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *KubernetesClusterForPost) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesClusterPropertiesForPost will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetProperties() *KubernetesClusterPropertiesForPost { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *KubernetesClusterForPost) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for KubernetesClusterEntities will be returned -func (o *KubernetesClusterForPost) GetEntities() *KubernetesClusterEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPost) GetType() *string { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPost) GetEntitiesOk() (*KubernetesClusterEntities, bool) { +func (o *KubernetesClusterForPost) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *KubernetesClusterForPost) SetEntities(v KubernetesClusterEntities) { +// SetType sets field value +func (o *KubernetesClusterForPost) SetType(v string) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *KubernetesClusterForPost) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesClusterForPost) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *KubernetesClusterForPost) HasEntities() bool { func (o KubernetesClusterForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_put.go index 2873bf5c8603..6edf7ca5fccf 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_for_put.go @@ -16,15 +16,15 @@ import ( // KubernetesClusterForPut struct for KubernetesClusterForPut type KubernetesClusterForPut struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` + Entities *KubernetesClusterEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesClusterPropertiesForPut `json:"properties"` - Entities *KubernetesClusterEntities `json:"entities,omitempty"` + // The type of object. + Type *string `json:"type,omitempty"` } // NewKubernetesClusterForPut instantiates a new KubernetesClusterForPut object @@ -47,114 +47,114 @@ func NewKubernetesClusterForPutWithDefaults() *KubernetesClusterForPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterForPut) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPut) GetEntities() *KubernetesClusterEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPut) GetIdOk() (*string, bool) { +func (o *KubernetesClusterForPut) GetEntitiesOk() (*KubernetesClusterEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *KubernetesClusterForPut) SetId(v string) { +// SetEntities sets field value +func (o *KubernetesClusterForPut) SetEntities(v KubernetesClusterEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesClusterForPut) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *KubernetesClusterForPut) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterForPut) GetType() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPut) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPut) GetTypeOk() (*string, bool) { +func (o *KubernetesClusterForPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *KubernetesClusterForPut) SetType(v string) { +// SetHref sets field value +func (o *KubernetesClusterForPut) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesClusterForPut) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesClusterForPut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterForPut) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPut) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPut) GetHrefOk() (*string, bool) { +func (o *KubernetesClusterForPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *KubernetesClusterForPut) SetHref(v string) { +// SetId sets field value +func (o *KubernetesClusterForPut) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesClusterForPut) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesClusterForPut) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *KubernetesClusterForPut) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *KubernetesClusterForPut) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesClusterPropertiesForPut will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetProperties() *KubernetesClusterPropertiesForPut { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *KubernetesClusterForPut) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for KubernetesClusterEntities will be returned -func (o *KubernetesClusterForPut) GetEntities() *KubernetesClusterEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterForPut) GetType() *string { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterForPut) GetEntitiesOk() (*KubernetesClusterEntities, bool) { +func (o *KubernetesClusterForPut) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *KubernetesClusterForPut) SetEntities(v KubernetesClusterEntities) { +// SetType sets field value +func (o *KubernetesClusterForPut) SetType(v string) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *KubernetesClusterForPut) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesClusterForPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *KubernetesClusterForPut) HasEntities() bool { func (o KubernetesClusterForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties.go index 376f0d2870e5..ed0629c7fd4e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties.go @@ -16,21 +16,27 @@ import ( // KubernetesClusterProperties struct for KubernetesClusterProperties type KubernetesClusterProperties struct { - // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. - Name *string `json:"name"` - // The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. - K8sVersion *string `json:"k8sVersion,omitempty"` - MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` + // Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. + ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` // List of available versions for upgrading the cluster AvailableUpgradeVersions *[]string `json:"availableUpgradeVersions,omitempty"` - // List of versions that may be used for node pools under this cluster - ViableNodePoolVersions *[]string `json:"viableNodePoolVersions,omitempty"` + // The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. + K8sVersion *string `json:"k8sVersion,omitempty"` + // The location of the cluster if the cluster is private. This property is immutable. The location must be enabled for your contract or you must have a Datacenter within that location. This attribute is mandatory if the cluster is private. + Location *string `json:"location,omitempty"` + MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` + // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. + Name *string `json:"name"` + // The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. + NatGatewayIp *string `json:"natGatewayIp,omitempty"` + // The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. + NodeSubnet *string `json:"nodeSubnet,omitempty"` // The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. Public *bool `json:"public,omitempty"` - // Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. - ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` // List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs S3Buckets *[]S3Bucket `json:"s3Buckets,omitempty"` + // List of versions that may be used for node pools under this cluster + ViableNodePoolVersions *[]string `json:"viableNodePoolVersions,omitempty"` } // NewKubernetesClusterProperties instantiates a new KubernetesClusterProperties object @@ -57,38 +63,76 @@ func NewKubernetesClusterPropertiesWithDefaults() *KubernetesClusterProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterProperties) GetName() *string { +// GetApiSubnetAllowList returns the ApiSubnetAllowList field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetApiSubnetAllowList() *[]string { if o == nil { return nil } - return o.Name + return o.ApiSubnetAllowList } -// GetNameOk returns a tuple with the Name field value +// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterProperties) GetNameOk() (*string, bool) { +func (o *KubernetesClusterProperties) GetApiSubnetAllowListOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.ApiSubnetAllowList, true } -// SetName sets field value -func (o *KubernetesClusterProperties) SetName(v string) { +// SetApiSubnetAllowList sets field value +func (o *KubernetesClusterProperties) SetApiSubnetAllowList(v []string) { - o.Name = &v + o.ApiSubnetAllowList = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesClusterProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasApiSubnetAllowList returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasApiSubnetAllowList() bool { + if o != nil && o.ApiSubnetAllowList != nil { + return true + } + + return false +} + +// GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetAvailableUpgradeVersions() *[]string { + if o == nil { + return nil + } + + return o.AvailableUpgradeVersions + +} + +// GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesClusterProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + + return o.AvailableUpgradeVersions, true +} + +// SetAvailableUpgradeVersions sets field value +func (o *KubernetesClusterProperties) SetAvailableUpgradeVersions(v []string) { + + o.AvailableUpgradeVersions = &v + +} + +// HasAvailableUpgradeVersions returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasAvailableUpgradeVersions() bool { + if o != nil && o.AvailableUpgradeVersions != nil { return true } @@ -96,7 +140,7 @@ func (o *KubernetesClusterProperties) HasName() bool { } // GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetK8sVersion() *string { if o == nil { return nil @@ -133,8 +177,46 @@ func (o *KubernetesClusterProperties) HasK8sVersion() bool { return false } +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetLocation() *string { + if o == nil { + return nil + } + + return o.Location + +} + +// GetLocationOk returns a tuple with the Location field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesClusterProperties) GetLocationOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Location, true +} + +// SetLocation sets field value +func (o *KubernetesClusterProperties) SetLocation(v string) { + + o.Location = &v + +} + +// HasLocation returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasLocation() bool { + if o != nil && o.Location != nil { + return true + } + + return false +} + // GetMaintenanceWindow returns the MaintenanceWindow field value -// If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil @@ -171,152 +253,152 @@ func (o *KubernetesClusterProperties) HasMaintenanceWindow() bool { return false } -// GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesClusterProperties) GetAvailableUpgradeVersions() *[]string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetName() *string { if o == nil { return nil } - return o.AvailableUpgradeVersions + return o.Name } -// GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool) { +func (o *KubernetesClusterProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailableUpgradeVersions, true + return o.Name, true } -// SetAvailableUpgradeVersions sets field value -func (o *KubernetesClusterProperties) SetAvailableUpgradeVersions(v []string) { +// SetName sets field value +func (o *KubernetesClusterProperties) SetName(v string) { - o.AvailableUpgradeVersions = &v + o.Name = &v } -// HasAvailableUpgradeVersions returns a boolean if a field has been set. -func (o *KubernetesClusterProperties) HasAvailableUpgradeVersions() bool { - if o != nil && o.AvailableUpgradeVersions != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetViableNodePoolVersions returns the ViableNodePoolVersions field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesClusterProperties) GetViableNodePoolVersions() *[]string { +// GetNatGatewayIp returns the NatGatewayIp field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetNatGatewayIp() *string { if o == nil { return nil } - return o.ViableNodePoolVersions + return o.NatGatewayIp } -// GetViableNodePoolVersionsOk returns a tuple with the ViableNodePoolVersions field value +// GetNatGatewayIpOk returns a tuple with the NatGatewayIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterProperties) GetViableNodePoolVersionsOk() (*[]string, bool) { +func (o *KubernetesClusterProperties) GetNatGatewayIpOk() (*string, bool) { if o == nil { return nil, false } - return o.ViableNodePoolVersions, true + return o.NatGatewayIp, true } -// SetViableNodePoolVersions sets field value -func (o *KubernetesClusterProperties) SetViableNodePoolVersions(v []string) { +// SetNatGatewayIp sets field value +func (o *KubernetesClusterProperties) SetNatGatewayIp(v string) { - o.ViableNodePoolVersions = &v + o.NatGatewayIp = &v } -// HasViableNodePoolVersions returns a boolean if a field has been set. -func (o *KubernetesClusterProperties) HasViableNodePoolVersions() bool { - if o != nil && o.ViableNodePoolVersions != nil { +// HasNatGatewayIp returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasNatGatewayIp() bool { + if o != nil && o.NatGatewayIp != nil { return true } return false } -// GetPublic returns the Public field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *KubernetesClusterProperties) GetPublic() *bool { +// GetNodeSubnet returns the NodeSubnet field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetNodeSubnet() *string { if o == nil { return nil } - return o.Public + return o.NodeSubnet } -// GetPublicOk returns a tuple with the Public field value +// GetNodeSubnetOk returns a tuple with the NodeSubnet field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterProperties) GetPublicOk() (*bool, bool) { +func (o *KubernetesClusterProperties) GetNodeSubnetOk() (*string, bool) { if o == nil { return nil, false } - return o.Public, true + return o.NodeSubnet, true } -// SetPublic sets field value -func (o *KubernetesClusterProperties) SetPublic(v bool) { +// SetNodeSubnet sets field value +func (o *KubernetesClusterProperties) SetNodeSubnet(v string) { - o.Public = &v + o.NodeSubnet = &v } -// HasPublic returns a boolean if a field has been set. -func (o *KubernetesClusterProperties) HasPublic() bool { - if o != nil && o.Public != nil { +// HasNodeSubnet returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasNodeSubnet() bool { + if o != nil && o.NodeSubnet != nil { return true } return false } -// GetApiSubnetAllowList returns the ApiSubnetAllowList field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesClusterProperties) GetApiSubnetAllowList() *[]string { +// GetPublic returns the Public field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetPublic() *bool { if o == nil { return nil } - return o.ApiSubnetAllowList + return o.Public } -// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value +// GetPublicOk returns a tuple with the Public field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterProperties) GetApiSubnetAllowListOk() (*[]string, bool) { +func (o *KubernetesClusterProperties) GetPublicOk() (*bool, bool) { if o == nil { return nil, false } - return o.ApiSubnetAllowList, true + return o.Public, true } -// SetApiSubnetAllowList sets field value -func (o *KubernetesClusterProperties) SetApiSubnetAllowList(v []string) { +// SetPublic sets field value +func (o *KubernetesClusterProperties) SetPublic(v bool) { - o.ApiSubnetAllowList = &v + o.Public = &v } -// HasApiSubnetAllowList returns a boolean if a field has been set. -func (o *KubernetesClusterProperties) HasApiSubnetAllowList() bool { - if o != nil && o.ApiSubnetAllowList != nil { +// HasPublic returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasPublic() bool { + if o != nil && o.Public != nil { return true } @@ -324,7 +406,7 @@ func (o *KubernetesClusterProperties) HasApiSubnetAllowList() bool { } // GetS3Buckets returns the S3Buckets field value -// If the value is explicit nil, the zero value for []S3Bucket will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetS3Buckets() *[]S3Bucket { if o == nil { return nil @@ -361,32 +443,90 @@ func (o *KubernetesClusterProperties) HasS3Buckets() bool { return false } +// GetViableNodePoolVersions returns the ViableNodePoolVersions field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterProperties) GetViableNodePoolVersions() *[]string { + if o == nil { + return nil + } + + return o.ViableNodePoolVersions + +} + +// GetViableNodePoolVersionsOk returns a tuple with the ViableNodePoolVersions field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesClusterProperties) GetViableNodePoolVersionsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + + return o.ViableNodePoolVersions, true +} + +// SetViableNodePoolVersions sets field value +func (o *KubernetesClusterProperties) SetViableNodePoolVersions(v []string) { + + o.ViableNodePoolVersions = &v + +} + +// HasViableNodePoolVersions returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasViableNodePoolVersions() bool { + if o != nil && o.ViableNodePoolVersions != nil { + return true + } + + return false +} + func (o KubernetesClusterProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.ApiSubnetAllowList != nil { + toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + } + + if o.AvailableUpgradeVersions != nil { + toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions } + if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } + + if o.Location != nil { + toSerialize["location"] = o.Location + } + if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } - if o.AvailableUpgradeVersions != nil { - toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions + + if o.Name != nil { + toSerialize["name"] = o.Name } - if o.ViableNodePoolVersions != nil { - toSerialize["viableNodePoolVersions"] = o.ViableNodePoolVersions + + if o.NatGatewayIp != nil { + toSerialize["natGatewayIp"] = o.NatGatewayIp + } + + if o.NodeSubnet != nil { + toSerialize["nodeSubnet"] = o.NodeSubnet } + if o.Public != nil { toSerialize["public"] = o.Public } - if o.ApiSubnetAllowList != nil { - toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList - } + if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } + + if o.ViableNodePoolVersions != nil { + toSerialize["viableNodePoolVersions"] = o.ViableNodePoolVersions + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_post.go index 42dfec53da8d..14c2b97b9551 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_post.go @@ -16,16 +16,22 @@ import ( // KubernetesClusterPropertiesForPost struct for KubernetesClusterPropertiesForPost type KubernetesClusterPropertiesForPost struct { + // Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. + ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` + // The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. + K8sVersion *string `json:"k8sVersion,omitempty"` + // This attribute is mandatory if the cluster is private. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable. + Location *string `json:"location,omitempty"` + MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` - // The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. - K8sVersion *string `json:"k8sVersion,omitempty"` - MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` - // The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. + // The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. + NatGatewayIp *string `json:"natGatewayIp,omitempty"` + // The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. + NodeSubnet *string `json:"nodeSubnet,omitempty"` + // The indicator whether the cluster is public or private. Note that the status FALSE is still in the beta phase. Public *bool `json:"public,omitempty"` - // Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. - ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` - // List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs + // List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. S3Buckets *[]S3Bucket `json:"s3Buckets,omitempty"` } @@ -53,38 +59,38 @@ func NewKubernetesClusterPropertiesForPostWithDefaults() *KubernetesClusterPrope return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterPropertiesForPost) GetName() *string { +// GetApiSubnetAllowList returns the ApiSubnetAllowList field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowList() *[]string { if o == nil { return nil } - return o.Name + return o.ApiSubnetAllowList } -// GetNameOk returns a tuple with the Name field value +// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterPropertiesForPost) GetNameOk() (*string, bool) { +func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowListOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.ApiSubnetAllowList, true } -// SetName sets field value -func (o *KubernetesClusterPropertiesForPost) SetName(v string) { +// SetApiSubnetAllowList sets field value +func (o *KubernetesClusterPropertiesForPost) SetApiSubnetAllowList(v []string) { - o.Name = &v + o.ApiSubnetAllowList = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesClusterPropertiesForPost) HasName() bool { - if o != nil && o.Name != nil { +// HasApiSubnetAllowList returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPost) HasApiSubnetAllowList() bool { + if o != nil && o.ApiSubnetAllowList != nil { return true } @@ -92,7 +98,7 @@ func (o *KubernetesClusterPropertiesForPost) HasName() bool { } // GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetK8sVersion() *string { if o == nil { return nil @@ -129,8 +135,46 @@ func (o *KubernetesClusterPropertiesForPost) HasK8sVersion() bool { return false } +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPost) GetLocation() *string { + if o == nil { + return nil + } + + return o.Location + +} + +// GetLocationOk returns a tuple with the Location field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesClusterPropertiesForPost) GetLocationOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Location, true +} + +// SetLocation sets field value +func (o *KubernetesClusterPropertiesForPost) SetLocation(v string) { + + o.Location = &v + +} + +// HasLocation returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPost) HasLocation() bool { + if o != nil && o.Location != nil { + return true + } + + return false +} + // GetMaintenanceWindow returns the MaintenanceWindow field value -// If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil @@ -167,76 +211,152 @@ func (o *KubernetesClusterPropertiesForPost) HasMaintenanceWindow() bool { return false } -// GetPublic returns the Public field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *KubernetesClusterPropertiesForPost) GetPublic() *bool { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPost) GetName() *string { if o == nil { return nil } - return o.Public + return o.Name } -// GetPublicOk returns a tuple with the Public field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterPropertiesForPost) GetPublicOk() (*bool, bool) { +func (o *KubernetesClusterPropertiesForPost) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Public, true + return o.Name, true } -// SetPublic sets field value -func (o *KubernetesClusterPropertiesForPost) SetPublic(v bool) { +// SetName sets field value +func (o *KubernetesClusterPropertiesForPost) SetName(v string) { - o.Public = &v + o.Name = &v } -// HasPublic returns a boolean if a field has been set. -func (o *KubernetesClusterPropertiesForPost) HasPublic() bool { - if o != nil && o.Public != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPost) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetApiSubnetAllowList returns the ApiSubnetAllowList field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowList() *[]string { +// GetNatGatewayIp returns the NatGatewayIp field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPost) GetNatGatewayIp() *string { if o == nil { return nil } - return o.ApiSubnetAllowList + return o.NatGatewayIp } -// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value +// GetNatGatewayIpOk returns a tuple with the NatGatewayIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowListOk() (*[]string, bool) { +func (o *KubernetesClusterPropertiesForPost) GetNatGatewayIpOk() (*string, bool) { if o == nil { return nil, false } - return o.ApiSubnetAllowList, true + return o.NatGatewayIp, true } -// SetApiSubnetAllowList sets field value -func (o *KubernetesClusterPropertiesForPost) SetApiSubnetAllowList(v []string) { +// SetNatGatewayIp sets field value +func (o *KubernetesClusterPropertiesForPost) SetNatGatewayIp(v string) { - o.ApiSubnetAllowList = &v + o.NatGatewayIp = &v } -// HasApiSubnetAllowList returns a boolean if a field has been set. -func (o *KubernetesClusterPropertiesForPost) HasApiSubnetAllowList() bool { - if o != nil && o.ApiSubnetAllowList != nil { +// HasNatGatewayIp returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPost) HasNatGatewayIp() bool { + if o != nil && o.NatGatewayIp != nil { + return true + } + + return false +} + +// GetNodeSubnet returns the NodeSubnet field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPost) GetNodeSubnet() *string { + if o == nil { + return nil + } + + return o.NodeSubnet + +} + +// GetNodeSubnetOk returns a tuple with the NodeSubnet field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesClusterPropertiesForPost) GetNodeSubnetOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.NodeSubnet, true +} + +// SetNodeSubnet sets field value +func (o *KubernetesClusterPropertiesForPost) SetNodeSubnet(v string) { + + o.NodeSubnet = &v + +} + +// HasNodeSubnet returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPost) HasNodeSubnet() bool { + if o != nil && o.NodeSubnet != nil { + return true + } + + return false +} + +// GetPublic returns the Public field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPost) GetPublic() *bool { + if o == nil { + return nil + } + + return o.Public + +} + +// GetPublicOk returns a tuple with the Public field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesClusterPropertiesForPost) GetPublicOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.Public, true +} + +// SetPublic sets field value +func (o *KubernetesClusterPropertiesForPost) SetPublic(v bool) { + + o.Public = &v + +} + +// HasPublic returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPost) HasPublic() bool { + if o != nil && o.Public != nil { return true } @@ -244,7 +364,7 @@ func (o *KubernetesClusterPropertiesForPost) HasApiSubnetAllowList() bool { } // GetS3Buckets returns the S3Buckets field value -// If the value is explicit nil, the zero value for []S3Bucket will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetS3Buckets() *[]S3Bucket { if o == nil { return nil @@ -283,24 +403,42 @@ func (o *KubernetesClusterPropertiesForPost) HasS3Buckets() bool { func (o KubernetesClusterPropertiesForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.ApiSubnetAllowList != nil { + toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList } + if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } + + if o.Location != nil { + toSerialize["location"] = o.Location + } + if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.NatGatewayIp != nil { + toSerialize["natGatewayIp"] = o.NatGatewayIp + } + + if o.NodeSubnet != nil { + toSerialize["nodeSubnet"] = o.NodeSubnet + } + if o.Public != nil { toSerialize["public"] = o.Public } - if o.ApiSubnetAllowList != nil { - toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList - } + if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_put.go index c845c73bc143..b2bc4980d7ca 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_cluster_properties_for_put.go @@ -16,14 +16,14 @@ import ( // KubernetesClusterPropertiesForPut struct for KubernetesClusterPropertiesForPut type KubernetesClusterPropertiesForPut struct { - // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. - Name *string `json:"name"` - // The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. + // Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. + ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` + // The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` - // Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. - ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` - // List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs + // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. + Name *string `json:"name"` + // List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. S3Buckets *[]S3Bucket `json:"s3Buckets,omitempty"` } @@ -47,38 +47,38 @@ func NewKubernetesClusterPropertiesForPutWithDefaults() *KubernetesClusterProper return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusterPropertiesForPut) GetName() *string { +// GetApiSubnetAllowList returns the ApiSubnetAllowList field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowList() *[]string { if o == nil { return nil } - return o.Name + return o.ApiSubnetAllowList } -// GetNameOk returns a tuple with the Name field value +// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterPropertiesForPut) GetNameOk() (*string, bool) { +func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowListOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.ApiSubnetAllowList, true } -// SetName sets field value -func (o *KubernetesClusterPropertiesForPut) SetName(v string) { +// SetApiSubnetAllowList sets field value +func (o *KubernetesClusterPropertiesForPut) SetApiSubnetAllowList(v []string) { - o.Name = &v + o.ApiSubnetAllowList = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesClusterPropertiesForPut) HasName() bool { - if o != nil && o.Name != nil { +// HasApiSubnetAllowList returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPut) HasApiSubnetAllowList() bool { + if o != nil && o.ApiSubnetAllowList != nil { return true } @@ -86,7 +86,7 @@ func (o *KubernetesClusterPropertiesForPut) HasName() bool { } // GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetK8sVersion() *string { if o == nil { return nil @@ -124,7 +124,7 @@ func (o *KubernetesClusterPropertiesForPut) HasK8sVersion() bool { } // GetMaintenanceWindow returns the MaintenanceWindow field value -// If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil @@ -161,38 +161,38 @@ func (o *KubernetesClusterPropertiesForPut) HasMaintenanceWindow() bool { return false } -// GetApiSubnetAllowList returns the ApiSubnetAllowList field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowList() *[]string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusterPropertiesForPut) GetName() *string { if o == nil { return nil } - return o.ApiSubnetAllowList + return o.Name } -// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowListOk() (*[]string, bool) { +func (o *KubernetesClusterPropertiesForPut) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.ApiSubnetAllowList, true + return o.Name, true } -// SetApiSubnetAllowList sets field value -func (o *KubernetesClusterPropertiesForPut) SetApiSubnetAllowList(v []string) { +// SetName sets field value +func (o *KubernetesClusterPropertiesForPut) SetName(v string) { - o.ApiSubnetAllowList = &v + o.Name = &v } -// HasApiSubnetAllowList returns a boolean if a field has been set. -func (o *KubernetesClusterPropertiesForPut) HasApiSubnetAllowList() bool { - if o != nil && o.ApiSubnetAllowList != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesClusterPropertiesForPut) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -200,7 +200,7 @@ func (o *KubernetesClusterPropertiesForPut) HasApiSubnetAllowList() bool { } // GetS3Buckets returns the S3Buckets field value -// If the value is explicit nil, the zero value for []S3Bucket will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetS3Buckets() *[]S3Bucket { if o == nil { return nil @@ -239,21 +239,26 @@ func (o *KubernetesClusterPropertiesForPut) HasS3Buckets() bool { func (o KubernetesClusterPropertiesForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.ApiSubnetAllowList != nil { + toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList } + if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } + if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } - if o.ApiSubnetAllowList != nil { - toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + + if o.Name != nil { + toSerialize["name"] = o.Name } + if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_clusters.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_clusters.go index 4066927e6dab..84f19c35cc5a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_clusters.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_clusters.go @@ -16,14 +16,14 @@ import ( // KubernetesClusters struct for KubernetesClusters type KubernetesClusters struct { - // A unique representation of the Kubernetes cluster as a resource collection. - Id *string `json:"id,omitempty"` - // The type of resource within a collection. - Type *string `json:"type,omitempty"` - // URL to the collection representation (absolute path). + // The URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` - // Array of items in the collection. + // The unique representation of the K8s cluster as a resource collection. + Id *string `json:"id,omitempty"` + // Array of K8s clusters in the collection. Items *[]KubernetesCluster `json:"items,omitempty"` + // The resource type within a collection. + Type *string `json:"type,omitempty"` } // NewKubernetesClusters instantiates a new KubernetesClusters object @@ -44,152 +44,152 @@ func NewKubernetesClustersWithDefaults() *KubernetesClusters { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusters) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusters) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusters) GetIdOk() (*string, bool) { +func (o *KubernetesClusters) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesClusters) SetId(v string) { +// SetHref sets field value +func (o *KubernetesClusters) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesClusters) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesClusters) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusters) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusters) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusters) GetTypeOk() (*string, bool) { +func (o *KubernetesClusters) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesClusters) SetType(v string) { +// SetId sets field value +func (o *KubernetesClusters) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesClusters) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesClusters) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesClusters) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusters) GetItems() *[]KubernetesCluster { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusters) GetHrefOk() (*string, bool) { +func (o *KubernetesClusters) GetItemsOk() (*[]KubernetesCluster, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *KubernetesClusters) SetHref(v string) { +// SetItems sets field value +func (o *KubernetesClusters) SetItems(v []KubernetesCluster) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesClusters) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *KubernetesClusters) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []KubernetesCluster will be returned -func (o *KubernetesClusters) GetItems() *[]KubernetesCluster { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesClusters) GetType() *string { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesClusters) GetItemsOk() (*[]KubernetesCluster, bool) { +func (o *KubernetesClusters) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *KubernetesClusters) SetItems(v []KubernetesCluster) { +// SetType sets field value +func (o *KubernetesClusters) SetType(v string) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *KubernetesClusters) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesClusters) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *KubernetesClusters) HasItems() bool { func (o KubernetesClusters) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_maintenance_window.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_maintenance_window.go index e257e823b5c7..86d576253442 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_maintenance_window.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_maintenance_window.go @@ -16,9 +16,9 @@ import ( // KubernetesMaintenanceWindow struct for KubernetesMaintenanceWindow type KubernetesMaintenanceWindow struct { - // The day of the week for a maintenance window. + // The weekday for a maintenance window. DayOfTheWeek *string `json:"dayOfTheWeek"` - // The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may varies by 15 minutes. + // The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may vary by 15 minutes. Time *string `json:"time"` } @@ -44,7 +44,7 @@ func NewKubernetesMaintenanceWindowWithDefaults() *KubernetesMaintenanceWindow { } // GetDayOfTheWeek returns the DayOfTheWeek field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesMaintenanceWindow) GetDayOfTheWeek() *string { if o == nil { return nil @@ -82,7 +82,7 @@ func (o *KubernetesMaintenanceWindow) HasDayOfTheWeek() bool { } // GetTime returns the Time field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesMaintenanceWindow) GetTime() *string { if o == nil { return nil @@ -124,9 +124,11 @@ func (o KubernetesMaintenanceWindow) MarshalJSON() ([]byte, error) { if o.DayOfTheWeek != nil { toSerialize["dayOfTheWeek"] = o.DayOfTheWeek } + if o.Time != nil { toSerialize["time"] = o.Time } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node.go index b3d8e2b81b5e..512c52312dff 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node.go @@ -16,14 +16,14 @@ import ( // KubernetesNode struct for KubernetesNode type KubernetesNode struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *KubernetesNodeMetadata `json:"metadata,omitempty"` Properties *KubernetesNodeProperties `json:"properties"` + // The object type. + Type *string `json:"type,omitempty"` } // NewKubernetesNode instantiates a new KubernetesNode object @@ -46,190 +46,190 @@ func NewKubernetesNodeWithDefaults() *KubernetesNode { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNode) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNode) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNode) GetIdOk() (*string, bool) { +func (o *KubernetesNode) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesNode) SetId(v string) { +// SetHref sets field value +func (o *KubernetesNode) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNode) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesNode) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNode) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNode) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNode) GetTypeOk() (*string, bool) { +func (o *KubernetesNode) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesNode) SetType(v string) { +// SetId sets field value +func (o *KubernetesNode) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesNode) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesNode) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNode) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNode) GetMetadata() *KubernetesNodeMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNode) GetHrefOk() (*string, bool) { +func (o *KubernetesNode) GetMetadataOk() (*KubernetesNodeMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *KubernetesNode) SetHref(v string) { +// SetMetadata sets field value +func (o *KubernetesNode) SetMetadata(v KubernetesNodeMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesNode) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *KubernetesNode) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for KubernetesNodeMetadata will be returned -func (o *KubernetesNode) GetMetadata() *KubernetesNodeMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNode) GetProperties() *KubernetesNodeProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNode) GetMetadataOk() (*KubernetesNodeMetadata, bool) { +func (o *KubernetesNode) GetPropertiesOk() (*KubernetesNodeProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *KubernetesNode) SetMetadata(v KubernetesNodeMetadata) { +// SetProperties sets field value +func (o *KubernetesNode) SetProperties(v KubernetesNodeProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *KubernetesNode) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *KubernetesNode) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesNodeProperties will be returned -func (o *KubernetesNode) GetProperties() *KubernetesNodeProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNode) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNode) GetPropertiesOk() (*KubernetesNodeProperties, bool) { +func (o *KubernetesNode) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *KubernetesNode) SetProperties(v KubernetesNodeProperties) { +// SetType sets field value +func (o *KubernetesNode) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *KubernetesNode) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesNode) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *KubernetesNode) HasProperties() bool { func (o KubernetesNode) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_metadata.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_metadata.go index 6d69ee2da294..3915ed80386a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_metadata.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_metadata.go @@ -17,16 +17,16 @@ import ( // KubernetesNodeMetadata struct for KubernetesNodeMetadata type KubernetesNodeMetadata struct { - // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. - Etag *string `json:"etag,omitempty"` - // The last time the resource was created. + // The date the resource was created. CreatedDate *IonosTime - // The last time the resource was modified. + // The resource entity tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity tags are also added as 'ETag' response headers to requests that do not use the 'depth' parameter. + Etag *string `json:"etag,omitempty"` + // The date the resource was last modified. LastModifiedDate *IonosTime - // State of the resource. - State *string `json:"state,omitempty"` - // The last time the software was updated on the node. + // The date when the software on the node was last updated. LastSoftwareUpdatedDate *IonosTime + // The resource state. + State *string `json:"state,omitempty"` } // NewKubernetesNodeMetadata instantiates a new KubernetesNodeMetadata object @@ -47,83 +47,83 @@ func NewKubernetesNodeMetadataWithDefaults() *KubernetesNodeMetadata { return &this } -// GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodeMetadata) GetEtag() *string { +// GetCreatedDate returns the CreatedDate field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } - return o.Etag + if o.CreatedDate == nil { + return nil + } + return &o.CreatedDate.Time } -// GetEtagOk returns a tuple with the Etag field value +// GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeMetadata) GetEtagOk() (*string, bool) { +func (o *KubernetesNodeMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.Etag, true + if o.CreatedDate == nil { + return nil, false + } + return &o.CreatedDate.Time, true + } -// SetEtag sets field value -func (o *KubernetesNodeMetadata) SetEtag(v string) { +// SetCreatedDate sets field value +func (o *KubernetesNodeMetadata) SetCreatedDate(v time.Time) { - o.Etag = &v + o.CreatedDate = &IonosTime{v} } -// HasEtag returns a boolean if a field has been set. -func (o *KubernetesNodeMetadata) HasEtag() bool { - if o != nil && o.Etag != nil { +// HasCreatedDate returns a boolean if a field has been set. +func (o *KubernetesNodeMetadata) HasCreatedDate() bool { + if o != nil && o.CreatedDate != nil { return true } return false } -// GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *KubernetesNodeMetadata) GetCreatedDate() *time.Time { +// GetEtag returns the Etag field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeMetadata) GetEtag() *string { if o == nil { return nil } - if o.CreatedDate == nil { - return nil - } - return &o.CreatedDate.Time + return o.Etag } -// GetCreatedDateOk returns a tuple with the CreatedDate field value +// GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeMetadata) GetCreatedDateOk() (*time.Time, bool) { +func (o *KubernetesNodeMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } - if o.CreatedDate == nil { - return nil, false - } - return &o.CreatedDate.Time, true - + return o.Etag, true } -// SetCreatedDate sets field value -func (o *KubernetesNodeMetadata) SetCreatedDate(v time.Time) { +// SetEtag sets field value +func (o *KubernetesNodeMetadata) SetEtag(v string) { - o.CreatedDate = &IonosTime{v} + o.Etag = &v } -// HasCreatedDate returns a boolean if a field has been set. -func (o *KubernetesNodeMetadata) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { +// HasEtag returns a boolean if a field has been set. +func (o *KubernetesNodeMetadata) HasEtag() bool { + if o != nil && o.Etag != nil { return true } @@ -131,7 +131,7 @@ func (o *KubernetesNodeMetadata) HasCreatedDate() bool { } // GetLastModifiedDate returns the LastModifiedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodeMetadata) GetLastModifiedDate() *time.Time { if o == nil { return nil @@ -175,83 +175,83 @@ func (o *KubernetesNodeMetadata) HasLastModifiedDate() bool { return false } -// GetState returns the State field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodeMetadata) GetState() *string { +// GetLastSoftwareUpdatedDate returns the LastSoftwareUpdatedDate field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDate() *time.Time { if o == nil { return nil } - return o.State + if o.LastSoftwareUpdatedDate == nil { + return nil + } + return &o.LastSoftwareUpdatedDate.Time } -// GetStateOk returns a tuple with the State field value +// GetLastSoftwareUpdatedDateOk returns a tuple with the LastSoftwareUpdatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeMetadata) GetStateOk() (*string, bool) { +func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.State, true + if o.LastSoftwareUpdatedDate == nil { + return nil, false + } + return &o.LastSoftwareUpdatedDate.Time, true + } -// SetState sets field value -func (o *KubernetesNodeMetadata) SetState(v string) { +// SetLastSoftwareUpdatedDate sets field value +func (o *KubernetesNodeMetadata) SetLastSoftwareUpdatedDate(v time.Time) { - o.State = &v + o.LastSoftwareUpdatedDate = &IonosTime{v} } -// HasState returns a boolean if a field has been set. -func (o *KubernetesNodeMetadata) HasState() bool { - if o != nil && o.State != nil { +// HasLastSoftwareUpdatedDate returns a boolean if a field has been set. +func (o *KubernetesNodeMetadata) HasLastSoftwareUpdatedDate() bool { + if o != nil && o.LastSoftwareUpdatedDate != nil { return true } return false } -// GetLastSoftwareUpdatedDate returns the LastSoftwareUpdatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDate() *time.Time { +// GetState returns the State field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeMetadata) GetState() *string { if o == nil { return nil } - if o.LastSoftwareUpdatedDate == nil { - return nil - } - return &o.LastSoftwareUpdatedDate.Time + return o.State } -// GetLastSoftwareUpdatedDateOk returns a tuple with the LastSoftwareUpdatedDate field value +// GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDateOk() (*time.Time, bool) { +func (o *KubernetesNodeMetadata) GetStateOk() (*string, bool) { if o == nil { return nil, false } - if o.LastSoftwareUpdatedDate == nil { - return nil, false - } - return &o.LastSoftwareUpdatedDate.Time, true - + return o.State, true } -// SetLastSoftwareUpdatedDate sets field value -func (o *KubernetesNodeMetadata) SetLastSoftwareUpdatedDate(v time.Time) { +// SetState sets field value +func (o *KubernetesNodeMetadata) SetState(v string) { - o.LastSoftwareUpdatedDate = &IonosTime{v} + o.State = &v } -// HasLastSoftwareUpdatedDate returns a boolean if a field has been set. -func (o *KubernetesNodeMetadata) HasLastSoftwareUpdatedDate() bool { - if o != nil && o.LastSoftwareUpdatedDate != nil { +// HasState returns a boolean if a field has been set. +func (o *KubernetesNodeMetadata) HasState() bool { + if o != nil && o.State != nil { return true } @@ -260,21 +260,26 @@ func (o *KubernetesNodeMetadata) HasLastSoftwareUpdatedDate() bool { func (o KubernetesNodeMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Etag != nil { - toSerialize["etag"] = o.Etag - } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } + + if o.Etag != nil { + toSerialize["etag"] = o.Etag + } + if o.LastModifiedDate != nil { toSerialize["lastModifiedDate"] = o.LastModifiedDate } - if o.State != nil { - toSerialize["state"] = o.State - } + if o.LastSoftwareUpdatedDate != nil { toSerialize["lastSoftwareUpdatedDate"] = o.LastSoftwareUpdatedDate } + + if o.State != nil { + toSerialize["state"] = o.State + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool.go index 04b859467c1b..9649a8ad8426 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool.go @@ -16,14 +16,14 @@ import ( // KubernetesNodePool struct for KubernetesNodePool type KubernetesNodePool struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesNodePoolProperties `json:"properties"` + // The object type. + Type *string `json:"type,omitempty"` } // NewKubernetesNodePool instantiates a new KubernetesNodePool object @@ -46,190 +46,190 @@ func NewKubernetesNodePoolWithDefaults() *KubernetesNodePool { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePool) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePool) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePool) GetIdOk() (*string, bool) { +func (o *KubernetesNodePool) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesNodePool) SetId(v string) { +// SetHref sets field value +func (o *KubernetesNodePool) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNodePool) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesNodePool) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePool) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePool) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePool) GetTypeOk() (*string, bool) { +func (o *KubernetesNodePool) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesNodePool) SetType(v string) { +// SetId sets field value +func (o *KubernetesNodePool) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesNodePool) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesNodePool) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePool) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePool) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePool) GetHrefOk() (*string, bool) { +func (o *KubernetesNodePool) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *KubernetesNodePool) SetHref(v string) { +// SetMetadata sets field value +func (o *KubernetesNodePool) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesNodePool) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *KubernetesNodePool) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *KubernetesNodePool) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePool) GetProperties() *KubernetesNodePoolProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePool) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *KubernetesNodePool) GetPropertiesOk() (*KubernetesNodePoolProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *KubernetesNodePool) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *KubernetesNodePool) SetProperties(v KubernetesNodePoolProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *KubernetesNodePool) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *KubernetesNodePool) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesNodePoolProperties will be returned -func (o *KubernetesNodePool) GetProperties() *KubernetesNodePoolProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePool) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePool) GetPropertiesOk() (*KubernetesNodePoolProperties, bool) { +func (o *KubernetesNodePool) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *KubernetesNodePool) SetProperties(v KubernetesNodePoolProperties) { +// SetType sets field value +func (o *KubernetesNodePool) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *KubernetesNodePool) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesNodePool) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *KubernetesNodePool) HasProperties() bool { func (o KubernetesNodePool) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_post.go index 8fd4e742d2c7..afeef99c7c7e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_post.go @@ -16,14 +16,14 @@ import ( // KubernetesNodePoolForPost struct for KubernetesNodePoolForPost type KubernetesNodePoolForPost struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesNodePoolPropertiesForPost `json:"properties"` + // The object type. + Type *string `json:"type,omitempty"` } // NewKubernetesNodePoolForPost instantiates a new KubernetesNodePoolForPost object @@ -46,190 +46,190 @@ func NewKubernetesNodePoolForPostWithDefaults() *KubernetesNodePoolForPost { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolForPost) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPost) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPost) GetIdOk() (*string, bool) { +func (o *KubernetesNodePoolForPost) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesNodePoolForPost) SetId(v string) { +// SetHref sets field value +func (o *KubernetesNodePoolForPost) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPost) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPost) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolForPost) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPost) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPost) GetTypeOk() (*string, bool) { +func (o *KubernetesNodePoolForPost) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesNodePoolForPost) SetType(v string) { +// SetId sets field value +func (o *KubernetesNodePoolForPost) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPost) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPost) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolForPost) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPost) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPost) GetHrefOk() (*string, bool) { +func (o *KubernetesNodePoolForPost) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *KubernetesNodePoolForPost) SetHref(v string) { +// SetMetadata sets field value +func (o *KubernetesNodePoolForPost) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPost) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPost) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *KubernetesNodePoolForPost) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPost) GetProperties() *KubernetesNodePoolPropertiesForPost { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPost) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *KubernetesNodePoolForPost) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPost, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *KubernetesNodePoolForPost) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *KubernetesNodePoolForPost) SetProperties(v KubernetesNodePoolPropertiesForPost) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPost) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPost) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesNodePoolPropertiesForPost will be returned -func (o *KubernetesNodePoolForPost) GetProperties() *KubernetesNodePoolPropertiesForPost { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPost) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPost) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPost, bool) { +func (o *KubernetesNodePoolForPost) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *KubernetesNodePoolForPost) SetProperties(v KubernetesNodePoolPropertiesForPost) { +// SetType sets field value +func (o *KubernetesNodePoolForPost) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPost) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPost) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *KubernetesNodePoolForPost) HasProperties() bool { func (o KubernetesNodePoolForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_put.go index 46fda0f5fafb..94df03dd911d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_for_put.go @@ -16,14 +16,14 @@ import ( // KubernetesNodePoolForPut struct for KubernetesNodePoolForPut type KubernetesNodePoolForPut struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object. - Type *string `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesNodePoolPropertiesForPut `json:"properties"` + // The object type. + Type *string `json:"type,omitempty"` } // NewKubernetesNodePoolForPut instantiates a new KubernetesNodePoolForPut object @@ -46,190 +46,190 @@ func NewKubernetesNodePoolForPutWithDefaults() *KubernetesNodePoolForPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolForPut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPut) GetIdOk() (*string, bool) { +func (o *KubernetesNodePoolForPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesNodePoolForPut) SetId(v string) { +// SetHref sets field value +func (o *KubernetesNodePoolForPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolForPut) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPut) GetTypeOk() (*string, bool) { +func (o *KubernetesNodePoolForPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesNodePoolForPut) SetType(v string) { +// SetId sets field value +func (o *KubernetesNodePoolForPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolForPut) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPut) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPut) GetHrefOk() (*string, bool) { +func (o *KubernetesNodePoolForPut) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *KubernetesNodePoolForPut) SetHref(v string) { +// SetMetadata sets field value +func (o *KubernetesNodePoolForPut) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPut) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPut) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *KubernetesNodePoolForPut) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPut) GetProperties() *KubernetesNodePoolPropertiesForPut { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPut) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *KubernetesNodePoolForPut) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPut, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *KubernetesNodePoolForPut) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *KubernetesNodePoolForPut) SetProperties(v KubernetesNodePoolPropertiesForPut) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPut) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for KubernetesNodePoolPropertiesForPut will be returned -func (o *KubernetesNodePoolForPut) GetProperties() *KubernetesNodePoolPropertiesForPut { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolForPut) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolForPut) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPut, bool) { +func (o *KubernetesNodePoolForPut) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *KubernetesNodePoolForPut) SetProperties(v KubernetesNodePoolPropertiesForPut) { +// SetType sets field value +func (o *KubernetesNodePoolForPut) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *KubernetesNodePoolForPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesNodePoolForPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *KubernetesNodePoolForPut) HasProperties() bool { func (o KubernetesNodePoolForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan.go index 88b08990c640..926f1498aada 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan.go @@ -16,11 +16,13 @@ import ( // KubernetesNodePoolLan struct for KubernetesNodePoolLan type KubernetesNodePoolLan struct { - // The LAN ID of an existing LAN at the related datacenter - Id *int32 `json:"id"` - // Indicates if the Kubernetes node pool LAN will reserve an IP using DHCP. + // The datacenter ID, requires system privileges, for internal usage only + DatacenterId *string `json:"datacenterId,omitempty"` + // Specifies whether the Kubernetes node pool LAN reserves an IP with DHCP. Dhcp *bool `json:"dhcp,omitempty"` - // array of additional LANs attached to worker nodes + // The LAN ID of an existing LAN at the related data center + Id *int32 `json:"id"` + // The array of additional LANs attached to worker nodes. Routes *[]KubernetesNodePoolLanRoutes `json:"routes,omitempty"` } @@ -44,38 +46,38 @@ func NewKubernetesNodePoolLanWithDefaults() *KubernetesNodePoolLan { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolLan) GetId() *int32 { +// GetDatacenterId returns the DatacenterId field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolLan) GetDatacenterId() *string { if o == nil { return nil } - return o.Id + return o.DatacenterId } -// GetIdOk returns a tuple with the Id field value +// GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolLan) GetIdOk() (*int32, bool) { +func (o *KubernetesNodePoolLan) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.DatacenterId, true } -// SetId sets field value -func (o *KubernetesNodePoolLan) SetId(v int32) { +// SetDatacenterId sets field value +func (o *KubernetesNodePoolLan) SetDatacenterId(v string) { - o.Id = &v + o.DatacenterId = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNodePoolLan) HasId() bool { - if o != nil && o.Id != nil { +// HasDatacenterId returns a boolean if a field has been set. +func (o *KubernetesNodePoolLan) HasDatacenterId() bool { + if o != nil && o.DatacenterId != nil { return true } @@ -83,7 +85,7 @@ func (o *KubernetesNodePoolLan) HasId() bool { } // GetDhcp returns the Dhcp field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLan) GetDhcp() *bool { if o == nil { return nil @@ -120,8 +122,46 @@ func (o *KubernetesNodePoolLan) HasDhcp() bool { return false } +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolLan) GetId() *int32 { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KubernetesNodePoolLan) GetIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *KubernetesNodePoolLan) SetId(v int32) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *KubernetesNodePoolLan) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + // GetRoutes returns the Routes field value -// If the value is explicit nil, the zero value for []KubernetesNodePoolLanRoutes will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLan) GetRoutes() *[]KubernetesNodePoolLanRoutes { if o == nil { return nil @@ -160,15 +200,22 @@ func (o *KubernetesNodePoolLan) HasRoutes() bool { func (o KubernetesNodePoolLan) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id + if o.DatacenterId != nil { + toSerialize["datacenterId"] = o.DatacenterId } + if o.Dhcp != nil { toSerialize["dhcp"] = o.Dhcp } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Routes != nil { toSerialize["routes"] = o.Routes } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan_routes.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan_routes.go index 0d57c45927f1..7ba035e44737 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan_routes.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_lan_routes.go @@ -16,10 +16,10 @@ import ( // KubernetesNodePoolLanRoutes struct for KubernetesNodePoolLanRoutes type KubernetesNodePoolLanRoutes struct { - // IPv4 or IPv6 CIDR to be routed via the interface. - Network *string `json:"network,omitempty"` // IPv4 or IPv6 Gateway IP for the route. GatewayIp *string `json:"gatewayIp,omitempty"` + // IPv4 or IPv6 CIDR to be routed via the interface. + Network *string `json:"network,omitempty"` } // NewKubernetesNodePoolLanRoutes instantiates a new KubernetesNodePoolLanRoutes object @@ -40,76 +40,76 @@ func NewKubernetesNodePoolLanRoutesWithDefaults() *KubernetesNodePoolLanRoutes { return &this } -// GetNetwork returns the Network field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolLanRoutes) GetNetwork() *string { +// GetGatewayIp returns the GatewayIp field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolLanRoutes) GetGatewayIp() *string { if o == nil { return nil } - return o.Network + return o.GatewayIp } -// GetNetworkOk returns a tuple with the Network field value +// GetGatewayIpOk returns a tuple with the GatewayIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolLanRoutes) GetNetworkOk() (*string, bool) { +func (o *KubernetesNodePoolLanRoutes) GetGatewayIpOk() (*string, bool) { if o == nil { return nil, false } - return o.Network, true + return o.GatewayIp, true } -// SetNetwork sets field value -func (o *KubernetesNodePoolLanRoutes) SetNetwork(v string) { +// SetGatewayIp sets field value +func (o *KubernetesNodePoolLanRoutes) SetGatewayIp(v string) { - o.Network = &v + o.GatewayIp = &v } -// HasNetwork returns a boolean if a field has been set. -func (o *KubernetesNodePoolLanRoutes) HasNetwork() bool { - if o != nil && o.Network != nil { +// HasGatewayIp returns a boolean if a field has been set. +func (o *KubernetesNodePoolLanRoutes) HasGatewayIp() bool { + if o != nil && o.GatewayIp != nil { return true } return false } -// GetGatewayIp returns the GatewayIp field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolLanRoutes) GetGatewayIp() *string { +// GetNetwork returns the Network field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolLanRoutes) GetNetwork() *string { if o == nil { return nil } - return o.GatewayIp + return o.Network } -// GetGatewayIpOk returns a tuple with the GatewayIp field value +// GetNetworkOk returns a tuple with the Network field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolLanRoutes) GetGatewayIpOk() (*string, bool) { +func (o *KubernetesNodePoolLanRoutes) GetNetworkOk() (*string, bool) { if o == nil { return nil, false } - return o.GatewayIp, true + return o.Network, true } -// SetGatewayIp sets field value -func (o *KubernetesNodePoolLanRoutes) SetGatewayIp(v string) { +// SetNetwork sets field value +func (o *KubernetesNodePoolLanRoutes) SetNetwork(v string) { - o.GatewayIp = &v + o.Network = &v } -// HasGatewayIp returns a boolean if a field has been set. -func (o *KubernetesNodePoolLanRoutes) HasGatewayIp() bool { - if o != nil && o.GatewayIp != nil { +// HasNetwork returns a boolean if a field has been set. +func (o *KubernetesNodePoolLanRoutes) HasNetwork() bool { + if o != nil && o.Network != nil { return true } @@ -118,12 +118,14 @@ func (o *KubernetesNodePoolLanRoutes) HasGatewayIp() bool { func (o KubernetesNodePoolLanRoutes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Network != nil { - toSerialize["network"] = o.Network - } if o.GatewayIp != nil { toSerialize["gatewayIp"] = o.GatewayIp } + + if o.Network != nil { + toSerialize["network"] = o.Network + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties.go index 22c3cb9e950f..376120c0c3b2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties.go @@ -16,58 +16,56 @@ import ( // KubernetesNodePoolProperties struct for KubernetesNodePoolProperties type KubernetesNodePoolProperties struct { + // The annotations attached to the node pool. + Annotations *map[string]string `json:"annotations,omitempty"` + AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` + // The availability zone in which the target VM should be provisioned. + AvailabilityZone *string `json:"availabilityZone"` + // The list of available versions for upgrading the node pool. + AvailableUpgradeVersions *[]string `json:"availableUpgradeVersions,omitempty"` + // The total number of cores for the nodes. + CoresCount *int32 `json:"coresCount"` + // The CPU type for the nodes. + CpuFamily *string `json:"cpuFamily"` + // The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. + DatacenterId *string `json:"datacenterId"` + // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. + K8sVersion *string `json:"k8sVersion,omitempty"` + // The labels attached to the node pool. + Labels *map[string]string `json:"labels,omitempty"` + // The array of existing private LANs to attach to worker nodes. + Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` + MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` - // A valid ID of the data center, to which user has access. - DatacenterId *string `json:"datacenterId"` - // The number of nodes that make up the node pool. + // The number of worker nodes of the node pool. NodeCount *int32 `json:"nodeCount"` - // A valid CPU family name. - CpuFamily *string `json:"cpuFamily"` - // The number of cores for the node. - CoresCount *int32 `json:"coresCount"` - // The RAM size for the node. Must be set in multiples of 1024 MB, with minimum size is of 2048 MB. + // Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. + PublicIps *[]string `json:"publicIps,omitempty"` + // The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. RamSize *int32 `json:"ramSize"` - // The availability zone in which the target VM should be provisioned. - AvailabilityZone *string `json:"availabilityZone"` - // The type of hardware for the volume. - StorageType *string `json:"storageType"` - // The size of the volume in GB. The size should be greater than 10GB. + // The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. StorageSize *int32 `json:"storageSize"` - // The Kubernetes version the nodepool is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. - K8sVersion *string `json:"k8sVersion,omitempty"` - MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` - AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` - // array of additional LANs attached to worker nodes - Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` - // map of labels attached to node pool. - Labels *map[string]string `json:"labels,omitempty"` - // map of annotations attached to node pool. - Annotations *map[string]string `json:"annotations,omitempty"` - // Optional array of reserved public IP addresses to be used by the nodes. IPs must be from same location as the data center used for the node pool. The array must contain one more IP than maximum number possible number of nodes (nodeCount+1 for fixed number of nodes or maxNodeCount+1 when auto scaling is used). The extra IP is used when the nodes are rebuilt. - PublicIps *[]string `json:"publicIps,omitempty"` - // List of available versions for upgrading the node pool. - AvailableUpgradeVersions *[]string `json:"availableUpgradeVersions,omitempty"` - // Public IP address for the gateway performing source NAT for the node pool's nodes belonging to a private cluster. Required only if the node pool belongs to a private cluster. - GatewayIp *string `json:"gatewayIp,omitempty"` + // The storage type for the nodes. + StorageType *string `json:"storageType"` } // NewKubernetesNodePoolProperties instantiates a new KubernetesNodePoolProperties 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 NewKubernetesNodePoolProperties(name string, datacenterId string, nodeCount int32, cpuFamily string, coresCount int32, ramSize int32, availabilityZone string, storageType string, storageSize int32) *KubernetesNodePoolProperties { +func NewKubernetesNodePoolProperties(availabilityZone string, coresCount int32, cpuFamily string, datacenterId string, name string, nodeCount int32, ramSize int32, storageSize int32, storageType string) *KubernetesNodePoolProperties { this := KubernetesNodePoolProperties{} - this.Name = &name + this.AvailabilityZone = &availabilityZone + this.CoresCount = &coresCount + this.CpuFamily = &cpuFamily this.DatacenterId = &datacenterId + this.Name = &name this.NodeCount = &nodeCount - this.CpuFamily = &cpuFamily - this.CoresCount = &coresCount this.RamSize = &ramSize - this.AvailabilityZone = &availabilityZone - this.StorageType = &storageType this.StorageSize = &storageSize + this.StorageType = &storageType return &this } @@ -80,152 +78,152 @@ func NewKubernetesNodePoolPropertiesWithDefaults() *KubernetesNodePoolProperties return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetName() *string { +// GetAnnotations returns the Annotations field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetAnnotations() *map[string]string { if o == nil { return nil } - return o.Name + return o.Annotations } -// GetNameOk returns a tuple with the Name field value +// GetAnnotationsOk returns a tuple with the Annotations field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetNameOk() (*string, bool) { +func (o *KubernetesNodePoolProperties) GetAnnotationsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Annotations, true } -// SetName sets field value -func (o *KubernetesNodePoolProperties) SetName(v string) { +// SetAnnotations sets field value +func (o *KubernetesNodePoolProperties) SetAnnotations(v map[string]string) { - o.Name = &v + o.Annotations = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasAnnotations returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasAnnotations() bool { + if o != nil && o.Annotations != nil { return true } return false } -// GetDatacenterId returns the DatacenterId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetDatacenterId() *string { +// GetAutoScaling returns the AutoScaling field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetAutoScaling() *KubernetesAutoScaling { if o == nil { return nil } - return o.DatacenterId + return o.AutoScaling } -// GetDatacenterIdOk returns a tuple with the DatacenterId field value +// GetAutoScalingOk returns a tuple with the AutoScaling field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetDatacenterIdOk() (*string, bool) { +func (o *KubernetesNodePoolProperties) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } - return o.DatacenterId, true + return o.AutoScaling, true } -// SetDatacenterId sets field value -func (o *KubernetesNodePoolProperties) SetDatacenterId(v string) { +// SetAutoScaling sets field value +func (o *KubernetesNodePoolProperties) SetAutoScaling(v KubernetesAutoScaling) { - o.DatacenterId = &v + o.AutoScaling = &v } -// HasDatacenterId returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasDatacenterId() bool { - if o != nil && o.DatacenterId != nil { +// HasAutoScaling returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasAutoScaling() bool { + if o != nil && o.AutoScaling != nil { return true } return false } -// GetNodeCount returns the NodeCount field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolProperties) GetNodeCount() *int32 { +// GetAvailabilityZone returns the AvailabilityZone field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetAvailabilityZone() *string { if o == nil { return nil } - return o.NodeCount + return o.AvailabilityZone } -// GetNodeCountOk returns a tuple with the NodeCount field value +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetNodeCountOk() (*int32, bool) { +func (o *KubernetesNodePoolProperties) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } - return o.NodeCount, true + return o.AvailabilityZone, true } -// SetNodeCount sets field value -func (o *KubernetesNodePoolProperties) SetNodeCount(v int32) { +// SetAvailabilityZone sets field value +func (o *KubernetesNodePoolProperties) SetAvailabilityZone(v string) { - o.NodeCount = &v + o.AvailabilityZone = &v } -// HasNodeCount returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasNodeCount() bool { - if o != nil && o.NodeCount != nil { +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasAvailabilityZone() bool { + if o != nil && o.AvailabilityZone != nil { return true } return false } -// GetCpuFamily returns the CpuFamily field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetCpuFamily() *string { +// GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersions() *[]string { if o == nil { return nil } - return o.CpuFamily + return o.AvailableUpgradeVersions } -// GetCpuFamilyOk returns a tuple with the CpuFamily field value +// GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetCpuFamilyOk() (*string, bool) { +func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.CpuFamily, true + return o.AvailableUpgradeVersions, true } -// SetCpuFamily sets field value -func (o *KubernetesNodePoolProperties) SetCpuFamily(v string) { +// SetAvailableUpgradeVersions sets field value +func (o *KubernetesNodePoolProperties) SetAvailableUpgradeVersions(v []string) { - o.CpuFamily = &v + o.AvailableUpgradeVersions = &v } -// HasCpuFamily returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasCpuFamily() bool { - if o != nil && o.CpuFamily != nil { +// HasAvailableUpgradeVersions returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasAvailableUpgradeVersions() bool { + if o != nil && o.AvailableUpgradeVersions != nil { return true } @@ -233,7 +231,7 @@ func (o *KubernetesNodePoolProperties) HasCpuFamily() bool { } // GetCoresCount returns the CoresCount field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetCoresCount() *int32 { if o == nil { return nil @@ -270,190 +268,190 @@ func (o *KubernetesNodePoolProperties) HasCoresCount() bool { return false } -// GetRamSize returns the RamSize field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolProperties) GetRamSize() *int32 { +// GetCpuFamily returns the CpuFamily field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetCpuFamily() *string { if o == nil { return nil } - return o.RamSize + return o.CpuFamily } -// GetRamSizeOk returns a tuple with the RamSize field value +// GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetRamSizeOk() (*int32, bool) { +func (o *KubernetesNodePoolProperties) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } - return o.RamSize, true + return o.CpuFamily, true } -// SetRamSize sets field value -func (o *KubernetesNodePoolProperties) SetRamSize(v int32) { +// SetCpuFamily sets field value +func (o *KubernetesNodePoolProperties) SetCpuFamily(v string) { - o.RamSize = &v + o.CpuFamily = &v } -// HasRamSize returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasRamSize() bool { - if o != nil && o.RamSize != nil { +// HasCpuFamily returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasCpuFamily() bool { + if o != nil && o.CpuFamily != nil { return true } return false } -// GetAvailabilityZone returns the AvailabilityZone field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetAvailabilityZone() *string { +// GetDatacenterId returns the DatacenterId field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetDatacenterId() *string { if o == nil { return nil } - return o.AvailabilityZone + return o.DatacenterId } -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetAvailabilityZoneOk() (*string, bool) { +func (o *KubernetesNodePoolProperties) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailabilityZone, true + return o.DatacenterId, true } -// SetAvailabilityZone sets field value -func (o *KubernetesNodePoolProperties) SetAvailabilityZone(v string) { +// SetDatacenterId sets field value +func (o *KubernetesNodePoolProperties) SetDatacenterId(v string) { - o.AvailabilityZone = &v + o.DatacenterId = &v } -// HasAvailabilityZone returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasAvailabilityZone() bool { - if o != nil && o.AvailabilityZone != nil { +// HasDatacenterId returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasDatacenterId() bool { + if o != nil && o.DatacenterId != nil { return true } return false } -// GetStorageType returns the StorageType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetStorageType() *string { +// GetK8sVersion returns the K8sVersion field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetK8sVersion() *string { if o == nil { return nil } - return o.StorageType + return o.K8sVersion } -// GetStorageTypeOk returns a tuple with the StorageType field value +// GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetStorageTypeOk() (*string, bool) { +func (o *KubernetesNodePoolProperties) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } - return o.StorageType, true + return o.K8sVersion, true } -// SetStorageType sets field value -func (o *KubernetesNodePoolProperties) SetStorageType(v string) { +// SetK8sVersion sets field value +func (o *KubernetesNodePoolProperties) SetK8sVersion(v string) { - o.StorageType = &v + o.K8sVersion = &v } -// HasStorageType returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasStorageType() bool { - if o != nil && o.StorageType != nil { +// HasK8sVersion returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasK8sVersion() bool { + if o != nil && o.K8sVersion != nil { return true } return false } -// GetStorageSize returns the StorageSize field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolProperties) GetStorageSize() *int32 { +// GetLabels returns the Labels field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetLabels() *map[string]string { if o == nil { return nil } - return o.StorageSize + return o.Labels } -// GetStorageSizeOk returns a tuple with the StorageSize field value +// GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetStorageSizeOk() (*int32, bool) { +func (o *KubernetesNodePoolProperties) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.StorageSize, true + return o.Labels, true } -// SetStorageSize sets field value -func (o *KubernetesNodePoolProperties) SetStorageSize(v int32) { +// SetLabels sets field value +func (o *KubernetesNodePoolProperties) SetLabels(v map[string]string) { - o.StorageSize = &v + o.Labels = &v } -// HasStorageSize returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasStorageSize() bool { - if o != nil && o.StorageSize != nil { +// HasLabels returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasLabels() bool { + if o != nil && o.Labels != nil { return true } return false } -// GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetK8sVersion() *string { +// GetLans returns the Lans field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetLans() *[]KubernetesNodePoolLan { if o == nil { return nil } - return o.K8sVersion + return o.Lans } -// GetK8sVersionOk returns a tuple with the K8sVersion field value +// GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetK8sVersionOk() (*string, bool) { +func (o *KubernetesNodePoolProperties) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } - return o.K8sVersion, true + return o.Lans, true } -// SetK8sVersion sets field value -func (o *KubernetesNodePoolProperties) SetK8sVersion(v string) { +// SetLans sets field value +func (o *KubernetesNodePoolProperties) SetLans(v []KubernetesNodePoolLan) { - o.K8sVersion = &v + o.Lans = &v } -// HasK8sVersion returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasK8sVersion() bool { - if o != nil && o.K8sVersion != nil { +// HasLans returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasLans() bool { + if o != nil && o.Lans != nil { return true } @@ -461,7 +459,7 @@ func (o *KubernetesNodePoolProperties) HasK8sVersion() bool { } // GetMaintenanceWindow returns the MaintenanceWindow field value -// If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil @@ -498,328 +496,304 @@ func (o *KubernetesNodePoolProperties) HasMaintenanceWindow() bool { return false } -// GetAutoScaling returns the AutoScaling field value -// If the value is explicit nil, the zero value for KubernetesAutoScaling will be returned -func (o *KubernetesNodePoolProperties) GetAutoScaling() *KubernetesAutoScaling { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetName() *string { if o == nil { return nil } - return o.AutoScaling + return o.Name } -// GetAutoScalingOk returns a tuple with the AutoScaling field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { +func (o *KubernetesNodePoolProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.AutoScaling, true + return o.Name, true } -// SetAutoScaling sets field value -func (o *KubernetesNodePoolProperties) SetAutoScaling(v KubernetesAutoScaling) { +// SetName sets field value +func (o *KubernetesNodePoolProperties) SetName(v string) { - o.AutoScaling = &v + o.Name = &v } -// HasAutoScaling returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasAutoScaling() bool { - if o != nil && o.AutoScaling != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetLans returns the Lans field value -// If the value is explicit nil, the zero value for []KubernetesNodePoolLan will be returned -func (o *KubernetesNodePoolProperties) GetLans() *[]KubernetesNodePoolLan { +// GetNodeCount returns the NodeCount field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetNodeCount() *int32 { if o == nil { return nil } - return o.Lans + return o.NodeCount } -// GetLansOk returns a tuple with the Lans field value +// GetNodeCountOk returns a tuple with the NodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetLansOk() (*[]KubernetesNodePoolLan, bool) { +func (o *KubernetesNodePoolProperties) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.Lans, true + return o.NodeCount, true } -// SetLans sets field value -func (o *KubernetesNodePoolProperties) SetLans(v []KubernetesNodePoolLan) { +// SetNodeCount sets field value +func (o *KubernetesNodePoolProperties) SetNodeCount(v int32) { - o.Lans = &v + o.NodeCount = &v } -// HasLans returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasLans() bool { - if o != nil && o.Lans != nil { +// HasNodeCount returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasNodeCount() bool { + if o != nil && o.NodeCount != nil { return true } return false } -// GetLabels returns the Labels field value -// If the value is explicit nil, the zero value for map[string]string will be returned -func (o *KubernetesNodePoolProperties) GetLabels() *map[string]string { +// GetPublicIps returns the PublicIps field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetPublicIps() *[]string { if o == nil { return nil } - return o.Labels + return o.PublicIps } -// GetLabelsOk returns a tuple with the Labels field value +// GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetLabelsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolProperties) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Labels, true + return o.PublicIps, true } -// SetLabels sets field value -func (o *KubernetesNodePoolProperties) SetLabels(v map[string]string) { +// SetPublicIps sets field value +func (o *KubernetesNodePoolProperties) SetPublicIps(v []string) { - o.Labels = &v + o.PublicIps = &v } -// HasLabels returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasLabels() bool { - if o != nil && o.Labels != nil { +// HasPublicIps returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasPublicIps() bool { + if o != nil && o.PublicIps != nil { return true } return false } -// GetAnnotations returns the Annotations field value -// If the value is explicit nil, the zero value for map[string]string will be returned -func (o *KubernetesNodePoolProperties) GetAnnotations() *map[string]string { +// GetRamSize returns the RamSize field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetRamSize() *int32 { if o == nil { return nil } - return o.Annotations + return o.RamSize } -// GetAnnotationsOk returns a tuple with the Annotations field value +// GetRamSizeOk returns a tuple with the RamSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetAnnotationsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolProperties) GetRamSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.Annotations, true + return o.RamSize, true } -// SetAnnotations sets field value -func (o *KubernetesNodePoolProperties) SetAnnotations(v map[string]string) { +// SetRamSize sets field value +func (o *KubernetesNodePoolProperties) SetRamSize(v int32) { - o.Annotations = &v + o.RamSize = &v } -// HasAnnotations returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasAnnotations() bool { - if o != nil && o.Annotations != nil { +// HasRamSize returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasRamSize() bool { + if o != nil && o.RamSize != nil { return true } return false } -// GetPublicIps returns the PublicIps field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesNodePoolProperties) GetPublicIps() *[]string { +// GetStorageSize returns the StorageSize field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetStorageSize() *int32 { if o == nil { return nil } - return o.PublicIps + return o.StorageSize } -// GetPublicIpsOk returns a tuple with the PublicIps field value +// GetStorageSizeOk returns a tuple with the StorageSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetPublicIpsOk() (*[]string, bool) { +func (o *KubernetesNodePoolProperties) GetStorageSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.PublicIps, true + return o.StorageSize, true } -// SetPublicIps sets field value -func (o *KubernetesNodePoolProperties) SetPublicIps(v []string) { +// SetStorageSize sets field value +func (o *KubernetesNodePoolProperties) SetStorageSize(v int32) { - o.PublicIps = &v + o.StorageSize = &v } -// HasPublicIps returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasPublicIps() bool { - if o != nil && o.PublicIps != nil { +// HasStorageSize returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasStorageSize() bool { + if o != nil && o.StorageSize != nil { return true } return false } -// GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersions() *[]string { +// GetStorageType returns the StorageType field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolProperties) GetStorageType() *string { if o == nil { return nil } - return o.AvailableUpgradeVersions + return o.StorageType } -// GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field value +// GetStorageTypeOk returns a tuple with the StorageType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool) { +func (o *KubernetesNodePoolProperties) GetStorageTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailableUpgradeVersions, true + return o.StorageType, true } -// SetAvailableUpgradeVersions sets field value -func (o *KubernetesNodePoolProperties) SetAvailableUpgradeVersions(v []string) { +// SetStorageType sets field value +func (o *KubernetesNodePoolProperties) SetStorageType(v string) { - o.AvailableUpgradeVersions = &v + o.StorageType = &v } -// HasAvailableUpgradeVersions returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasAvailableUpgradeVersions() bool { - if o != nil && o.AvailableUpgradeVersions != nil { +// HasStorageType returns a boolean if a field has been set. +func (o *KubernetesNodePoolProperties) HasStorageType() bool { + if o != nil && o.StorageType != nil { return true } return false } -// GetGatewayIp returns the GatewayIp field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolProperties) GetGatewayIp() *string { - if o == nil { - return nil +func (o KubernetesNodePoolProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Annotations != nil { + toSerialize["annotations"] = o.Annotations } - return o.GatewayIp + if o.AutoScaling != nil { + toSerialize["autoScaling"] = o.AutoScaling + } -} + if o.AvailabilityZone != nil { + toSerialize["availabilityZone"] = o.AvailabilityZone + } -// GetGatewayIpOk returns a tuple with the GatewayIp field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolProperties) GetGatewayIpOk() (*string, bool) { - if o == nil { - return nil, false + if o.AvailableUpgradeVersions != nil { + toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions } - return o.GatewayIp, true -} + if o.CoresCount != nil { + toSerialize["coresCount"] = o.CoresCount + } -// SetGatewayIp sets field value -func (o *KubernetesNodePoolProperties) SetGatewayIp(v string) { + if o.CpuFamily != nil { + toSerialize["cpuFamily"] = o.CpuFamily + } - o.GatewayIp = &v + if o.DatacenterId != nil { + toSerialize["datacenterId"] = o.DatacenterId + } -} + if o.K8sVersion != nil { + toSerialize["k8sVersion"] = o.K8sVersion + } -// HasGatewayIp returns a boolean if a field has been set. -func (o *KubernetesNodePoolProperties) HasGatewayIp() bool { - if o != nil && o.GatewayIp != nil { - return true + if o.Labels != nil { + toSerialize["labels"] = o.Labels } - return false -} + if o.Lans != nil { + toSerialize["lans"] = o.Lans + } + + if o.MaintenanceWindow != nil { + toSerialize["maintenanceWindow"] = o.MaintenanceWindow + } -func (o KubernetesNodePoolProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } - if o.DatacenterId != nil { - toSerialize["datacenterId"] = o.DatacenterId - } + if o.NodeCount != nil { toSerialize["nodeCount"] = o.NodeCount } - if o.CpuFamily != nil { - toSerialize["cpuFamily"] = o.CpuFamily - } - if o.CoresCount != nil { - toSerialize["coresCount"] = o.CoresCount + + if o.PublicIps != nil { + toSerialize["publicIps"] = o.PublicIps } + if o.RamSize != nil { toSerialize["ramSize"] = o.RamSize } - if o.AvailabilityZone != nil { - toSerialize["availabilityZone"] = o.AvailabilityZone - } - if o.StorageType != nil { - toSerialize["storageType"] = o.StorageType - } + if o.StorageSize != nil { toSerialize["storageSize"] = o.StorageSize } - if o.K8sVersion != nil { - toSerialize["k8sVersion"] = o.K8sVersion - } - if o.MaintenanceWindow != nil { - toSerialize["maintenanceWindow"] = o.MaintenanceWindow - } - if o.AutoScaling != nil { - toSerialize["autoScaling"] = o.AutoScaling - } - if o.Lans != nil { - toSerialize["lans"] = o.Lans - } - if o.Labels != nil { - toSerialize["labels"] = o.Labels - } - if o.Annotations != nil { - toSerialize["annotations"] = o.Annotations - } - if o.PublicIps != nil { - toSerialize["publicIps"] = o.PublicIps - } - if o.AvailableUpgradeVersions != nil { - toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions - } - if o.GatewayIp != nil { - toSerialize["gatewayIp"] = o.GatewayIp + + if o.StorageType != nil { + toSerialize["storageType"] = o.StorageType } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_post.go index fe4062e813d3..c55191cfa077 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_post.go @@ -16,56 +16,54 @@ import ( // KubernetesNodePoolPropertiesForPost struct for KubernetesNodePoolPropertiesForPost type KubernetesNodePoolPropertiesForPost struct { + // The annotations attached to the node pool. + Annotations *map[string]string `json:"annotations,omitempty"` + AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` + // The availability zone in which the target VM should be provisioned. + AvailabilityZone *string `json:"availabilityZone"` + // The total number of cores for the nodes. + CoresCount *int32 `json:"coresCount"` + // The CPU type for the nodes. + CpuFamily *string `json:"cpuFamily"` + // The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. + DatacenterId *string `json:"datacenterId"` + // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. + K8sVersion *string `json:"k8sVersion,omitempty"` + // The labels attached to the node pool. + Labels *map[string]string `json:"labels,omitempty"` + // The array of existing private LANs to attach to worker nodes. + Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` + MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` - // A valid ID of the data center, to which the user has access. - DatacenterId *string `json:"datacenterId"` - // The number of nodes that make up the node pool. + // The number of worker nodes of the node pool. NodeCount *int32 `json:"nodeCount"` - // A valid CPU family name. - CpuFamily *string `json:"cpuFamily"` - // The number of cores for the node. - CoresCount *int32 `json:"coresCount"` - // The RAM size for the node. Must be set in multiples of 1024 MB, with minimum size is of 2048 MB. + // Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. + PublicIps *[]string `json:"publicIps,omitempty"` + // The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. RamSize *int32 `json:"ramSize"` - // The availability zone in which the target VM should be provisioned. - AvailabilityZone *string `json:"availabilityZone"` - // The type of hardware for the volume. - StorageType *string `json:"storageType"` - // The size of the volume in GB. The size should be greater than 10GB. + // The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. StorageSize *int32 `json:"storageSize"` - // The Kubernetes version the nodepool is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. - K8sVersion *string `json:"k8sVersion,omitempty"` - MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` - AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` - // array of additional LANs attached to worker nodes - Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` - // map of labels attached to node pool. - Labels *map[string]string `json:"labels,omitempty"` - // map of annotations attached to node pool. - Annotations *map[string]string `json:"annotations,omitempty"` - // Optional array of reserved public IP addresses to be used by the nodes. IPs must be from same location as the data center used for the node pool. The array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for fixed number of nodes or maxNodeCount+1 when auto scaling is used). The extra IP is used when the nodes are rebuilt. - PublicIps *[]string `json:"publicIps,omitempty"` - // Public IP address for the gateway performing source NAT for the node pool's nodes belonging to a private cluster. Required only if the node pool belongs to a private cluster. - GatewayIp *string `json:"gatewayIp,omitempty"` + // The storage type for the nodes. + StorageType *string `json:"storageType"` } // NewKubernetesNodePoolPropertiesForPost instantiates a new KubernetesNodePoolPropertiesForPost 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 NewKubernetesNodePoolPropertiesForPost(name string, datacenterId string, nodeCount int32, cpuFamily string, coresCount int32, ramSize int32, availabilityZone string, storageType string, storageSize int32) *KubernetesNodePoolPropertiesForPost { +func NewKubernetesNodePoolPropertiesForPost(availabilityZone string, coresCount int32, cpuFamily string, datacenterId string, name string, nodeCount int32, ramSize int32, storageSize int32, storageType string) *KubernetesNodePoolPropertiesForPost { this := KubernetesNodePoolPropertiesForPost{} - this.Name = &name + this.AvailabilityZone = &availabilityZone + this.CoresCount = &coresCount + this.CpuFamily = &cpuFamily this.DatacenterId = &datacenterId + this.Name = &name this.NodeCount = &nodeCount - this.CpuFamily = &cpuFamily - this.CoresCount = &coresCount this.RamSize = &ramSize - this.AvailabilityZone = &availabilityZone - this.StorageType = &storageType this.StorageSize = &storageSize + this.StorageType = &storageType return &this } @@ -78,152 +76,114 @@ func NewKubernetesNodePoolPropertiesForPostWithDefaults() *KubernetesNodePoolPro return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetName() *string { - if o == nil { - return nil - } - - return o.Name - -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - - return o.Name, true -} - -// SetName sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetName(v string) { - - o.Name = &v - -} - -// HasName returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// GetDatacenterId returns the DatacenterId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterId() *string { +// GetAnnotations returns the Annotations field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetAnnotations() *map[string]string { if o == nil { return nil } - return o.DatacenterId + return o.Annotations } -// GetDatacenterIdOk returns a tuple with the DatacenterId field value +// GetAnnotationsOk returns a tuple with the Annotations field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterIdOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetAnnotationsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.DatacenterId, true + return o.Annotations, true } -// SetDatacenterId sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetDatacenterId(v string) { +// SetAnnotations sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetAnnotations(v map[string]string) { - o.DatacenterId = &v + o.Annotations = &v } -// HasDatacenterId returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasDatacenterId() bool { - if o != nil && o.DatacenterId != nil { +// HasAnnotations returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasAnnotations() bool { + if o != nil && o.Annotations != nil { return true } return false } -// GetNodeCount returns the NodeCount field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetNodeCount() *int32 { +// GetAutoScaling returns the AutoScaling field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetAutoScaling() *KubernetesAutoScaling { if o == nil { return nil } - return o.NodeCount + return o.AutoScaling } -// GetNodeCountOk returns a tuple with the NodeCount field value +// GetAutoScalingOk returns a tuple with the AutoScaling field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetNodeCountOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } - return o.NodeCount, true + return o.AutoScaling, true } -// SetNodeCount sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetNodeCount(v int32) { +// SetAutoScaling sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetAutoScaling(v KubernetesAutoScaling) { - o.NodeCount = &v + o.AutoScaling = &v } -// HasNodeCount returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasNodeCount() bool { - if o != nil && o.NodeCount != nil { +// HasAutoScaling returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasAutoScaling() bool { + if o != nil && o.AutoScaling != nil { return true } return false } -// GetCpuFamily returns the CpuFamily field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamily() *string { +// GetAvailabilityZone returns the AvailabilityZone field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZone() *string { if o == nil { return nil } - return o.CpuFamily + return o.AvailabilityZone } -// GetCpuFamilyOk returns a tuple with the CpuFamily field value +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamilyOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } - return o.CpuFamily, true + return o.AvailabilityZone, true } -// SetCpuFamily sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetCpuFamily(v string) { +// SetAvailabilityZone sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetAvailabilityZone(v string) { - o.CpuFamily = &v + o.AvailabilityZone = &v } -// HasCpuFamily returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasCpuFamily() bool { - if o != nil && o.CpuFamily != nil { +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasAvailabilityZone() bool { + if o != nil && o.AvailabilityZone != nil { return true } @@ -231,7 +191,7 @@ func (o *KubernetesNodePoolPropertiesForPost) HasCpuFamily() bool { } // GetCoresCount returns the CoresCount field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetCoresCount() *int32 { if o == nil { return nil @@ -268,190 +228,190 @@ func (o *KubernetesNodePoolPropertiesForPost) HasCoresCount() bool { return false } -// GetRamSize returns the RamSize field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetRamSize() *int32 { +// GetCpuFamily returns the CpuFamily field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamily() *string { if o == nil { return nil } - return o.RamSize + return o.CpuFamily } -// GetRamSizeOk returns a tuple with the RamSize field value +// GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetRamSizeOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } - return o.RamSize, true + return o.CpuFamily, true } -// SetRamSize sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetRamSize(v int32) { +// SetCpuFamily sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetCpuFamily(v string) { - o.RamSize = &v + o.CpuFamily = &v } -// HasRamSize returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasRamSize() bool { - if o != nil && o.RamSize != nil { +// HasCpuFamily returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasCpuFamily() bool { + if o != nil && o.CpuFamily != nil { return true } return false } -// GetAvailabilityZone returns the AvailabilityZone field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZone() *string { +// GetDatacenterId returns the DatacenterId field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterId() *string { if o == nil { return nil } - return o.AvailabilityZone + return o.DatacenterId } -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZoneOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailabilityZone, true + return o.DatacenterId, true } -// SetAvailabilityZone sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetAvailabilityZone(v string) { +// SetDatacenterId sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetDatacenterId(v string) { - o.AvailabilityZone = &v + o.DatacenterId = &v } -// HasAvailabilityZone returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasAvailabilityZone() bool { - if o != nil && o.AvailabilityZone != nil { +// HasDatacenterId returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasDatacenterId() bool { + if o != nil && o.DatacenterId != nil { return true } return false } -// GetStorageType returns the StorageType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetStorageType() *string { +// GetK8sVersion returns the K8sVersion field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersion() *string { if o == nil { return nil } - return o.StorageType + return o.K8sVersion } -// GetStorageTypeOk returns a tuple with the StorageType field value +// GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetStorageTypeOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } - return o.StorageType, true + return o.K8sVersion, true } -// SetStorageType sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetStorageType(v string) { +// SetK8sVersion sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetK8sVersion(v string) { - o.StorageType = &v + o.K8sVersion = &v } -// HasStorageType returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasStorageType() bool { - if o != nil && o.StorageType != nil { +// HasK8sVersion returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasK8sVersion() bool { + if o != nil && o.K8sVersion != nil { return true } return false } -// GetStorageSize returns the StorageSize field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetStorageSize() *int32 { +// GetLabels returns the Labels field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetLabels() *map[string]string { if o == nil { return nil } - return o.StorageSize + return o.Labels } -// GetStorageSizeOk returns a tuple with the StorageSize field value +// GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetStorageSizeOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.StorageSize, true + return o.Labels, true } -// SetStorageSize sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetStorageSize(v int32) { +// SetLabels sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetLabels(v map[string]string) { - o.StorageSize = &v + o.Labels = &v } -// HasStorageSize returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasStorageSize() bool { - if o != nil && o.StorageSize != nil { +// HasLabels returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasLabels() bool { + if o != nil && o.Labels != nil { return true } return false } -// GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersion() *string { +// GetLans returns the Lans field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetLans() *[]KubernetesNodePoolLan { if o == nil { return nil } - return o.K8sVersion + return o.Lans } -// GetK8sVersionOk returns a tuple with the K8sVersion field value +// GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersionOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } - return o.K8sVersion, true + return o.Lans, true } -// SetK8sVersion sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetK8sVersion(v string) { +// SetLans sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetLans(v []KubernetesNodePoolLan) { - o.K8sVersion = &v + o.Lans = &v } -// HasK8sVersion returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasK8sVersion() bool { - if o != nil && o.K8sVersion != nil { +// HasLans returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasLans() bool { + if o != nil && o.Lans != nil { return true } @@ -459,7 +419,7 @@ func (o *KubernetesNodePoolPropertiesForPost) HasK8sVersion() bool { } // GetMaintenanceWindow returns the MaintenanceWindow field value -// If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil @@ -496,228 +456,228 @@ func (o *KubernetesNodePoolPropertiesForPost) HasMaintenanceWindow() bool { return false } -// GetAutoScaling returns the AutoScaling field value -// If the value is explicit nil, the zero value for KubernetesAutoScaling will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetAutoScaling() *KubernetesAutoScaling { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetName() *string { if o == nil { return nil } - return o.AutoScaling + return o.Name } -// GetAutoScalingOk returns a tuple with the AutoScaling field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.AutoScaling, true + return o.Name, true } -// SetAutoScaling sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetAutoScaling(v KubernetesAutoScaling) { +// SetName sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetName(v string) { - o.AutoScaling = &v + o.Name = &v } -// HasAutoScaling returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasAutoScaling() bool { - if o != nil && o.AutoScaling != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetLans returns the Lans field value -// If the value is explicit nil, the zero value for []KubernetesNodePoolLan will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetLans() *[]KubernetesNodePoolLan { +// GetNodeCount returns the NodeCount field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetNodeCount() *int32 { if o == nil { return nil } - return o.Lans + return o.NodeCount } -// GetLansOk returns a tuple with the Lans field value +// GetNodeCountOk returns a tuple with the NodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetLansOk() (*[]KubernetesNodePoolLan, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.Lans, true + return o.NodeCount, true } -// SetLans sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetLans(v []KubernetesNodePoolLan) { +// SetNodeCount sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetNodeCount(v int32) { - o.Lans = &v + o.NodeCount = &v } -// HasLans returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasLans() bool { - if o != nil && o.Lans != nil { +// HasNodeCount returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasNodeCount() bool { + if o != nil && o.NodeCount != nil { return true } return false } -// GetLabels returns the Labels field value -// If the value is explicit nil, the zero value for map[string]string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetLabels() *map[string]string { +// GetPublicIps returns the PublicIps field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetPublicIps() *[]string { if o == nil { return nil } - return o.Labels + return o.PublicIps } -// GetLabelsOk returns a tuple with the Labels field value +// GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetLabelsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Labels, true + return o.PublicIps, true } -// SetLabels sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetLabels(v map[string]string) { +// SetPublicIps sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetPublicIps(v []string) { - o.Labels = &v + o.PublicIps = &v } -// HasLabels returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasLabels() bool { - if o != nil && o.Labels != nil { +// HasPublicIps returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasPublicIps() bool { + if o != nil && o.PublicIps != nil { return true } return false } -// GetAnnotations returns the Annotations field value -// If the value is explicit nil, the zero value for map[string]string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetAnnotations() *map[string]string { +// GetRamSize returns the RamSize field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetRamSize() *int32 { if o == nil { return nil } - return o.Annotations + return o.RamSize } -// GetAnnotationsOk returns a tuple with the Annotations field value +// GetRamSizeOk returns a tuple with the RamSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetAnnotationsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetRamSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.Annotations, true + return o.RamSize, true } -// SetAnnotations sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetAnnotations(v map[string]string) { +// SetRamSize sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetRamSize(v int32) { - o.Annotations = &v + o.RamSize = &v } -// HasAnnotations returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasAnnotations() bool { - if o != nil && o.Annotations != nil { +// HasRamSize returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasRamSize() bool { + if o != nil && o.RamSize != nil { return true } return false } -// GetPublicIps returns the PublicIps field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetPublicIps() *[]string { +// GetStorageSize returns the StorageSize field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetStorageSize() *int32 { if o == nil { return nil } - return o.PublicIps + return o.StorageSize } -// GetPublicIpsOk returns a tuple with the PublicIps field value +// GetStorageSizeOk returns a tuple with the StorageSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetPublicIpsOk() (*[]string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetStorageSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.PublicIps, true + return o.StorageSize, true } -// SetPublicIps sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetPublicIps(v []string) { +// SetStorageSize sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetStorageSize(v int32) { - o.PublicIps = &v + o.StorageSize = &v } -// HasPublicIps returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasPublicIps() bool { - if o != nil && o.PublicIps != nil { +// HasStorageSize returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasStorageSize() bool { + if o != nil && o.StorageSize != nil { return true } return false } -// GetGatewayIp returns the GatewayIp field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetGatewayIp() *string { +// GetStorageType returns the StorageType field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetStorageType() *string { if o == nil { return nil } - return o.GatewayIp + return o.StorageType } -// GetGatewayIpOk returns a tuple with the GatewayIp field value +// GetStorageTypeOk returns a tuple with the StorageType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetGatewayIpOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetStorageTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.GatewayIp, true + return o.StorageType, true } -// SetGatewayIp sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetGatewayIp(v string) { +// SetStorageType sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetStorageType(v string) { - o.GatewayIp = &v + o.StorageType = &v } -// HasGatewayIp returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasGatewayIp() bool { - if o != nil && o.GatewayIp != nil { +// HasStorageType returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasStorageType() bool { + if o != nil && o.StorageType != nil { return true } @@ -726,57 +686,70 @@ func (o *KubernetesNodePoolPropertiesForPost) HasGatewayIp() bool { func (o KubernetesNodePoolPropertiesForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.DatacenterId != nil { - toSerialize["datacenterId"] = o.DatacenterId + if o.Annotations != nil { + toSerialize["annotations"] = o.Annotations } - if o.NodeCount != nil { - toSerialize["nodeCount"] = o.NodeCount + + if o.AutoScaling != nil { + toSerialize["autoScaling"] = o.AutoScaling } - if o.CpuFamily != nil { - toSerialize["cpuFamily"] = o.CpuFamily + + if o.AvailabilityZone != nil { + toSerialize["availabilityZone"] = o.AvailabilityZone } + if o.CoresCount != nil { toSerialize["coresCount"] = o.CoresCount } - if o.RamSize != nil { - toSerialize["ramSize"] = o.RamSize - } - if o.AvailabilityZone != nil { - toSerialize["availabilityZone"] = o.AvailabilityZone - } - if o.StorageType != nil { - toSerialize["storageType"] = o.StorageType + + if o.CpuFamily != nil { + toSerialize["cpuFamily"] = o.CpuFamily } - if o.StorageSize != nil { - toSerialize["storageSize"] = o.StorageSize + + if o.DatacenterId != nil { + toSerialize["datacenterId"] = o.DatacenterId } + if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } - if o.MaintenanceWindow != nil { - toSerialize["maintenanceWindow"] = o.MaintenanceWindow - } - if o.AutoScaling != nil { - toSerialize["autoScaling"] = o.AutoScaling + + if o.Labels != nil { + toSerialize["labels"] = o.Labels } + if o.Lans != nil { toSerialize["lans"] = o.Lans } - if o.Labels != nil { - toSerialize["labels"] = o.Labels + + if o.MaintenanceWindow != nil { + toSerialize["maintenanceWindow"] = o.MaintenanceWindow } - if o.Annotations != nil { - toSerialize["annotations"] = o.Annotations + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.NodeCount != nil { + toSerialize["nodeCount"] = o.NodeCount } + if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } - if o.GatewayIp != nil { - toSerialize["gatewayIp"] = o.GatewayIp + + if o.RamSize != nil { + toSerialize["ramSize"] = o.RamSize + } + + if o.StorageSize != nil { + toSerialize["storageSize"] = o.StorageSize + } + + if o.StorageType != nil { + toSerialize["storageType"] = o.StorageType } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_put.go index 3b0081c3e2f7..3e82ea9c496a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pool_properties_for_put.go @@ -16,21 +16,21 @@ import ( // KubernetesNodePoolPropertiesForPut struct for KubernetesNodePoolPropertiesForPut type KubernetesNodePoolPropertiesForPut struct { + // The annotations attached to the node pool. + Annotations *map[string]string `json:"annotations,omitempty"` + AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` + // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. + K8sVersion *string `json:"k8sVersion,omitempty"` + // The labels attached to the node pool. + Labels *map[string]string `json:"labels,omitempty"` + // The array of existing private LANs to attach to worker nodes. + Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` + MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name,omitempty"` - // The number of nodes that make up the node pool. + // The number of worker nodes of the node pool. NodeCount *int32 `json:"nodeCount"` - // The Kubernetes version the nodepool is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. - K8sVersion *string `json:"k8sVersion,omitempty"` - MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` - AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` - // array of additional LANs attached to worker nodes - Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` - // map of labels attached to node pool. - Labels *map[string]string `json:"labels,omitempty"` - // map of annotations attached to node pool. - Annotations *map[string]string `json:"annotations,omitempty"` - // Optional array of reserved public IP addresses to be used by the nodes. IPs must be from same location as the data center used for the node pool. The array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for fixed number of nodes or maxNodeCount+1 when auto scaling is used). The extra IP is used when the nodes are rebuilt. + // Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. PublicIps *[]string `json:"publicIps,omitempty"` } @@ -54,76 +54,76 @@ func NewKubernetesNodePoolPropertiesForPutWithDefaults() *KubernetesNodePoolProp return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetName() *string { +// GetAnnotations returns the Annotations field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetAnnotations() *map[string]string { if o == nil { return nil } - return o.Name + return o.Annotations } -// GetNameOk returns a tuple with the Name field value +// GetAnnotationsOk returns a tuple with the Annotations field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetNameOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetAnnotationsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Annotations, true } -// SetName sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetName(v string) { +// SetAnnotations sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetAnnotations(v map[string]string) { - o.Name = &v + o.Annotations = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasName() bool { - if o != nil && o.Name != nil { +// HasAnnotations returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasAnnotations() bool { + if o != nil && o.Annotations != nil { return true } return false } -// GetNodeCount returns the NodeCount field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetNodeCount() *int32 { +// GetAutoScaling returns the AutoScaling field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetAutoScaling() *KubernetesAutoScaling { if o == nil { return nil } - return o.NodeCount + return o.AutoScaling } -// GetNodeCountOk returns a tuple with the NodeCount field value +// GetAutoScalingOk returns a tuple with the AutoScaling field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetNodeCountOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } - return o.NodeCount, true + return o.AutoScaling, true } -// SetNodeCount sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetNodeCount(v int32) { +// SetAutoScaling sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetAutoScaling(v KubernetesAutoScaling) { - o.NodeCount = &v + o.AutoScaling = &v } -// HasNodeCount returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasNodeCount() bool { - if o != nil && o.NodeCount != nil { +// HasAutoScaling returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasAutoScaling() bool { + if o != nil && o.AutoScaling != nil { return true } @@ -131,7 +131,7 @@ func (o *KubernetesNodePoolPropertiesForPut) HasNodeCount() bool { } // GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersion() *string { if o == nil { return nil @@ -168,190 +168,190 @@ func (o *KubernetesNodePoolPropertiesForPut) HasK8sVersion() bool { return false } -// GetMaintenanceWindow returns the MaintenanceWindow field value -// If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindow() *KubernetesMaintenanceWindow { +// GetLabels returns the Labels field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetLabels() *map[string]string { if o == nil { return nil } - return o.MaintenanceWindow + return o.Labels } -// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value +// GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.MaintenanceWindow, true + return o.Labels, true } -// SetMaintenanceWindow sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { +// SetLabels sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetLabels(v map[string]string) { - o.MaintenanceWindow = &v + o.Labels = &v } -// HasMaintenanceWindow returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasMaintenanceWindow() bool { - if o != nil && o.MaintenanceWindow != nil { +// HasLabels returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasLabels() bool { + if o != nil && o.Labels != nil { return true } return false } -// GetAutoScaling returns the AutoScaling field value -// If the value is explicit nil, the zero value for KubernetesAutoScaling will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetAutoScaling() *KubernetesAutoScaling { +// GetLans returns the Lans field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetLans() *[]KubernetesNodePoolLan { if o == nil { return nil } - return o.AutoScaling + return o.Lans } -// GetAutoScalingOk returns a tuple with the AutoScaling field value +// GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } - return o.AutoScaling, true + return o.Lans, true } -// SetAutoScaling sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetAutoScaling(v KubernetesAutoScaling) { +// SetLans sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetLans(v []KubernetesNodePoolLan) { - o.AutoScaling = &v + o.Lans = &v } -// HasAutoScaling returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasAutoScaling() bool { - if o != nil && o.AutoScaling != nil { +// HasLans returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasLans() bool { + if o != nil && o.Lans != nil { return true } return false } -// GetLans returns the Lans field value -// If the value is explicit nil, the zero value for []KubernetesNodePoolLan will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetLans() *[]KubernetesNodePoolLan { +// GetMaintenanceWindow returns the MaintenanceWindow field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } - return o.Lans + return o.MaintenanceWindow } -// GetLansOk returns a tuple with the Lans field value +// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetLansOk() (*[]KubernetesNodePoolLan, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } - return o.Lans, true + return o.MaintenanceWindow, true } -// SetLans sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetLans(v []KubernetesNodePoolLan) { +// SetMaintenanceWindow sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { - o.Lans = &v + o.MaintenanceWindow = &v } -// HasLans returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasLans() bool { - if o != nil && o.Lans != nil { +// HasMaintenanceWindow returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasMaintenanceWindow() bool { + if o != nil && o.MaintenanceWindow != nil { return true } return false } -// GetLabels returns the Labels field value -// If the value is explicit nil, the zero value for map[string]string will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetLabels() *map[string]string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetName() *string { if o == nil { return nil } - return o.Labels + return o.Name } -// GetLabelsOk returns a tuple with the Labels field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetLabelsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Labels, true + return o.Name, true } -// SetLabels sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetLabels(v map[string]string) { +// SetName sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetName(v string) { - o.Labels = &v + o.Name = &v } -// HasLabels returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasLabels() bool { - if o != nil && o.Labels != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetAnnotations returns the Annotations field value -// If the value is explicit nil, the zero value for map[string]string will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetAnnotations() *map[string]string { +// GetNodeCount returns the NodeCount field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPut) GetNodeCount() *int32 { if o == nil { return nil } - return o.Annotations + return o.NodeCount } -// GetAnnotationsOk returns a tuple with the Annotations field value +// GetNodeCountOk returns a tuple with the NodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePoolPropertiesForPut) GetAnnotationsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolPropertiesForPut) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.Annotations, true + return o.NodeCount, true } -// SetAnnotations sets field value -func (o *KubernetesNodePoolPropertiesForPut) SetAnnotations(v map[string]string) { +// SetNodeCount sets field value +func (o *KubernetesNodePoolPropertiesForPut) SetNodeCount(v int32) { - o.Annotations = &v + o.NodeCount = &v } -// HasAnnotations returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPut) HasAnnotations() bool { - if o != nil && o.Annotations != nil { +// HasNodeCount returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPut) HasNodeCount() bool { + if o != nil && o.NodeCount != nil { return true } @@ -359,7 +359,7 @@ func (o *KubernetesNodePoolPropertiesForPut) HasAnnotations() bool { } // GetPublicIps returns the PublicIps field value -// If the value is explicit nil, the zero value for []string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetPublicIps() *[]string { if o == nil { return nil @@ -398,33 +398,42 @@ func (o *KubernetesNodePoolPropertiesForPut) HasPublicIps() bool { func (o KubernetesNodePoolPropertiesForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Annotations != nil { + toSerialize["annotations"] = o.Annotations } - if o.NodeCount != nil { - toSerialize["nodeCount"] = o.NodeCount + + if o.AutoScaling != nil { + toSerialize["autoScaling"] = o.AutoScaling } + if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } - if o.MaintenanceWindow != nil { - toSerialize["maintenanceWindow"] = o.MaintenanceWindow - } - if o.AutoScaling != nil { - toSerialize["autoScaling"] = o.AutoScaling + + if o.Labels != nil { + toSerialize["labels"] = o.Labels } + if o.Lans != nil { toSerialize["lans"] = o.Lans } - if o.Labels != nil { - toSerialize["labels"] = o.Labels + + if o.MaintenanceWindow != nil { + toSerialize["maintenanceWindow"] = o.MaintenanceWindow } - if o.Annotations != nil { - toSerialize["annotations"] = o.Annotations + + if o.Name != nil { + toSerialize["name"] = o.Name } + + if o.NodeCount != nil { + toSerialize["nodeCount"] = o.NodeCount + } + if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pools.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pools.go index 9e9d8d80e433..50ebf55680cb 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pools.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_pools.go @@ -16,14 +16,14 @@ import ( // KubernetesNodePools struct for KubernetesNodePools type KubernetesNodePools struct { + // The URL to the collection representation (absolute path). + Href *string `json:"href,omitempty"` // A unique representation of the Kubernetes node pool as a resource collection. Id *string `json:"id,omitempty"` - // The type of resource within a collection. - Type *string `json:"type,omitempty"` - // URL to the collection representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]KubernetesNodePool `json:"items,omitempty"` + // The resource type within a collection. + Type *string `json:"type,omitempty"` } // NewKubernetesNodePools instantiates a new KubernetesNodePools object @@ -44,152 +44,152 @@ func NewKubernetesNodePoolsWithDefaults() *KubernetesNodePools { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePools) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePools) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePools) GetIdOk() (*string, bool) { +func (o *KubernetesNodePools) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesNodePools) SetId(v string) { +// SetHref sets field value +func (o *KubernetesNodePools) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNodePools) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesNodePools) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePools) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePools) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePools) GetTypeOk() (*string, bool) { +func (o *KubernetesNodePools) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesNodePools) SetType(v string) { +// SetId sets field value +func (o *KubernetesNodePools) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesNodePools) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesNodePools) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodePools) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePools) GetItems() *[]KubernetesNodePool { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePools) GetHrefOk() (*string, bool) { +func (o *KubernetesNodePools) GetItemsOk() (*[]KubernetesNodePool, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *KubernetesNodePools) SetHref(v string) { +// SetItems sets field value +func (o *KubernetesNodePools) SetItems(v []KubernetesNodePool) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesNodePools) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *KubernetesNodePools) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []KubernetesNodePool will be returned -func (o *KubernetesNodePools) GetItems() *[]KubernetesNodePool { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePools) GetType() *string { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodePools) GetItemsOk() (*[]KubernetesNodePool, bool) { +func (o *KubernetesNodePools) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *KubernetesNodePools) SetItems(v []KubernetesNodePool) { +// SetType sets field value +func (o *KubernetesNodePools) SetType(v string) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *KubernetesNodePools) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesNodePools) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *KubernetesNodePools) HasItems() bool { func (o KubernetesNodePools) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_properties.go index eee05965c629..e5f67c963a9d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_node_properties.go @@ -16,25 +16,25 @@ import ( // KubernetesNodeProperties struct for KubernetesNodeProperties type KubernetesNodeProperties struct { - // A Kubernetes node name. + // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. + K8sVersion *string `json:"k8sVersion"` + // The Kubernetes node name. Name *string `json:"name"` - // A valid public IP. - PublicIP *string `json:"publicIP,omitempty"` - // A valid private IP. + // The private IP associated with the node. PrivateIP *string `json:"privateIP,omitempty"` - // The Kubernetes version the nodepool is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. - K8sVersion *string `json:"k8sVersion"` + // The public IP associated with the node. + PublicIP *string `json:"publicIP,omitempty"` } // NewKubernetesNodeProperties instantiates a new KubernetesNodeProperties 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 NewKubernetesNodeProperties(name string, k8sVersion string) *KubernetesNodeProperties { +func NewKubernetesNodeProperties(k8sVersion string, name string) *KubernetesNodeProperties { this := KubernetesNodeProperties{} - this.Name = &name this.K8sVersion = &k8sVersion + this.Name = &name return &this } @@ -47,76 +47,76 @@ func NewKubernetesNodePropertiesWithDefaults() *KubernetesNodeProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodeProperties) GetName() *string { +// GetK8sVersion returns the K8sVersion field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeProperties) GetK8sVersion() *string { if o == nil { return nil } - return o.Name + return o.K8sVersion } -// GetNameOk returns a tuple with the Name field value +// GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeProperties) GetNameOk() (*string, bool) { +func (o *KubernetesNodeProperties) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.K8sVersion, true } -// SetName sets field value -func (o *KubernetesNodeProperties) SetName(v string) { +// SetK8sVersion sets field value +func (o *KubernetesNodeProperties) SetK8sVersion(v string) { - o.Name = &v + o.K8sVersion = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesNodeProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasK8sVersion returns a boolean if a field has been set. +func (o *KubernetesNodeProperties) HasK8sVersion() bool { + if o != nil && o.K8sVersion != nil { return true } return false } -// GetPublicIP returns the PublicIP field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodeProperties) GetPublicIP() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeProperties) GetName() *string { if o == nil { return nil } - return o.PublicIP + return o.Name } -// GetPublicIPOk returns a tuple with the PublicIP field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeProperties) GetPublicIPOk() (*string, bool) { +func (o *KubernetesNodeProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.PublicIP, true + return o.Name, true } -// SetPublicIP sets field value -func (o *KubernetesNodeProperties) SetPublicIP(v string) { +// SetName sets field value +func (o *KubernetesNodeProperties) SetName(v string) { - o.PublicIP = &v + o.Name = &v } -// HasPublicIP returns a boolean if a field has been set. -func (o *KubernetesNodeProperties) HasPublicIP() bool { - if o != nil && o.PublicIP != nil { +// HasName returns a boolean if a field has been set. +func (o *KubernetesNodeProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -124,7 +124,7 @@ func (o *KubernetesNodeProperties) HasPublicIP() bool { } // GetPrivateIP returns the PrivateIP field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *KubernetesNodeProperties) GetPrivateIP() *string { if o == nil { return nil @@ -161,38 +161,38 @@ func (o *KubernetesNodeProperties) HasPrivateIP() bool { return false } -// GetK8sVersion returns the K8sVersion field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodeProperties) GetK8sVersion() *string { +// GetPublicIP returns the PublicIP field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodeProperties) GetPublicIP() *string { if o == nil { return nil } - return o.K8sVersion + return o.PublicIP } -// GetK8sVersionOk returns a tuple with the K8sVersion field value +// GetPublicIPOk returns a tuple with the PublicIP field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodeProperties) GetK8sVersionOk() (*string, bool) { +func (o *KubernetesNodeProperties) GetPublicIPOk() (*string, bool) { if o == nil { return nil, false } - return o.K8sVersion, true + return o.PublicIP, true } -// SetK8sVersion sets field value -func (o *KubernetesNodeProperties) SetK8sVersion(v string) { +// SetPublicIP sets field value +func (o *KubernetesNodeProperties) SetPublicIP(v string) { - o.K8sVersion = &v + o.PublicIP = &v } -// HasK8sVersion returns a boolean if a field has been set. -func (o *KubernetesNodeProperties) HasK8sVersion() bool { - if o != nil && o.K8sVersion != nil { +// HasPublicIP returns a boolean if a field has been set. +func (o *KubernetesNodeProperties) HasPublicIP() bool { + if o != nil && o.PublicIP != nil { return true } @@ -201,18 +201,22 @@ func (o *KubernetesNodeProperties) HasK8sVersion() bool { func (o KubernetesNodeProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.K8sVersion != nil { + toSerialize["k8sVersion"] = o.K8sVersion + } + if o.Name != nil { toSerialize["name"] = o.Name } - if o.PublicIP != nil { - toSerialize["publicIP"] = o.PublicIP - } + if o.PrivateIP != nil { toSerialize["privateIP"] = o.PrivateIP } - if o.K8sVersion != nil { - toSerialize["k8sVersion"] = o.K8sVersion + + if o.PublicIP != nil { + toSerialize["publicIP"] = o.PublicIP } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_nodes.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_nodes.go index 8381bf4ccd9f..a96c038486aa 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_nodes.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_kubernetes_nodes.go @@ -16,14 +16,14 @@ import ( // KubernetesNodes struct for KubernetesNodes type KubernetesNodes struct { + // The URL to the collection representation (absolute path). + Href *string `json:"href,omitempty"` // A unique representation of the Kubernetes node pool as a resource collection. Id *string `json:"id,omitempty"` - // The type of resource within a collection. - Type *string `json:"type,omitempty"` - // URL to the collection representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]KubernetesNode `json:"items,omitempty"` + // The resource type within a collection. + Type *string `json:"type,omitempty"` } // NewKubernetesNodes instantiates a new KubernetesNodes object @@ -44,152 +44,152 @@ func NewKubernetesNodesWithDefaults() *KubernetesNodes { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodes) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodes) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodes) GetIdOk() (*string, bool) { +func (o *KubernetesNodes) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *KubernetesNodes) SetId(v string) { +// SetHref sets field value +func (o *KubernetesNodes) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *KubernetesNodes) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *KubernetesNodes) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodes) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodes) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodes) GetTypeOk() (*string, bool) { +func (o *KubernetesNodes) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *KubernetesNodes) SetType(v string) { +// SetId sets field value +func (o *KubernetesNodes) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *KubernetesNodes) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *KubernetesNodes) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *KubernetesNodes) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodes) GetItems() *[]KubernetesNode { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodes) GetHrefOk() (*string, bool) { +func (o *KubernetesNodes) GetItemsOk() (*[]KubernetesNode, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *KubernetesNodes) SetHref(v string) { +// SetItems sets field value +func (o *KubernetesNodes) SetItems(v []KubernetesNode) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *KubernetesNodes) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *KubernetesNodes) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []KubernetesNode will be returned -func (o *KubernetesNodes) GetItems() *[]KubernetesNode { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodes) GetType() *string { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *KubernetesNodes) GetItemsOk() (*[]KubernetesNode, bool) { +func (o *KubernetesNodes) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *KubernetesNodes) SetItems(v []KubernetesNode) { +// SetType sets field value +func (o *KubernetesNodes) SetType(v string) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *KubernetesNodes) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *KubernetesNodes) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *KubernetesNodes) HasItems() bool { func (o KubernetesNodes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label.go index c162e6763347..f28f2af5936d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label.go @@ -16,14 +16,14 @@ import ( // Label struct for Label type Label struct { - // Label is identified using standard URN. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // Label is identified using standard URN. + Id *string `json:"id,omitempty"` Metadata *NoStateMetaData `json:"metadata,omitempty"` Properties *LabelProperties `json:"properties"` + // The type of object that has been created. + Type *string `json:"type,omitempty"` } // NewLabel instantiates a new Label object @@ -46,190 +46,190 @@ func NewLabelWithDefaults() *Label { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Label) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Label) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Label) GetIdOk() (*string, bool) { +func (o *Label) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Label) SetId(v string) { +// SetHref sets field value +func (o *Label) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Label) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Label) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Label) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Label) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Label) GetTypeOk() (*string, bool) { +func (o *Label) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Label) SetType(v string) { +// SetId sets field value +func (o *Label) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Label) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Label) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Label) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Label) GetMetadata() *NoStateMetaData { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Label) GetHrefOk() (*string, bool) { +func (o *Label) GetMetadataOk() (*NoStateMetaData, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Label) SetHref(v string) { +// SetMetadata sets field value +func (o *Label) SetMetadata(v NoStateMetaData) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Label) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Label) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for NoStateMetaData will be returned -func (o *Label) GetMetadata() *NoStateMetaData { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Label) GetProperties() *LabelProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Label) GetMetadataOk() (*NoStateMetaData, bool) { +func (o *Label) GetPropertiesOk() (*LabelProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Label) SetMetadata(v NoStateMetaData) { +// SetProperties sets field value +func (o *Label) SetProperties(v LabelProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Label) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Label) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for LabelProperties will be returned -func (o *Label) GetProperties() *LabelProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Label) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Label) GetPropertiesOk() (*LabelProperties, bool) { +func (o *Label) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Label) SetProperties(v LabelProperties) { +// SetType sets field value +func (o *Label) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Label) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Label) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Label) HasProperties() bool { func (o Label) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_properties.go index a7a0d794cf57..f561a5fb773f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_properties.go @@ -18,14 +18,14 @@ import ( type LabelProperties struct { // A label key Key *string `json:"key,omitempty"` - // A label value - Value *string `json:"value,omitempty"` + // URL to the Resource (absolute path) on which the label is applied. + ResourceHref *string `json:"resourceHref,omitempty"` // The ID of the resource. ResourceId *string `json:"resourceId,omitempty"` // The type of the resource on which the label is applied. ResourceType *string `json:"resourceType,omitempty"` - // URL to the Resource (absolute path) on which the label is applied. - ResourceHref *string `json:"resourceHref,omitempty"` + // A label value + Value *string `json:"value,omitempty"` } // NewLabelProperties instantiates a new LabelProperties object @@ -47,7 +47,7 @@ func NewLabelPropertiesWithDefaults() *LabelProperties { } // GetKey returns the Key field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LabelProperties) GetKey() *string { if o == nil { return nil @@ -84,38 +84,38 @@ func (o *LabelProperties) HasKey() bool { return false } -// GetValue returns the Value field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelProperties) GetValue() *string { +// GetResourceHref returns the ResourceHref field value +// If the value is explicit nil, nil is returned +func (o *LabelProperties) GetResourceHref() *string { if o == nil { return nil } - return o.Value + return o.ResourceHref } -// GetValueOk returns a tuple with the Value field value +// GetResourceHrefOk returns a tuple with the ResourceHref field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelProperties) GetValueOk() (*string, bool) { +func (o *LabelProperties) GetResourceHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Value, true + return o.ResourceHref, true } -// SetValue sets field value -func (o *LabelProperties) SetValue(v string) { +// SetResourceHref sets field value +func (o *LabelProperties) SetResourceHref(v string) { - o.Value = &v + o.ResourceHref = &v } -// HasValue returns a boolean if a field has been set. -func (o *LabelProperties) HasValue() bool { - if o != nil && o.Value != nil { +// HasResourceHref returns a boolean if a field has been set. +func (o *LabelProperties) HasResourceHref() bool { + if o != nil && o.ResourceHref != nil { return true } @@ -123,7 +123,7 @@ func (o *LabelProperties) HasValue() bool { } // GetResourceId returns the ResourceId field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LabelProperties) GetResourceId() *string { if o == nil { return nil @@ -161,7 +161,7 @@ func (o *LabelProperties) HasResourceId() bool { } // GetResourceType returns the ResourceType field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LabelProperties) GetResourceType() *string { if o == nil { return nil @@ -198,38 +198,38 @@ func (o *LabelProperties) HasResourceType() bool { return false } -// GetResourceHref returns the ResourceHref field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelProperties) GetResourceHref() *string { +// GetValue returns the Value field value +// If the value is explicit nil, nil is returned +func (o *LabelProperties) GetValue() *string { if o == nil { return nil } - return o.ResourceHref + return o.Value } -// GetResourceHrefOk returns a tuple with the ResourceHref field value +// GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelProperties) GetResourceHrefOk() (*string, bool) { +func (o *LabelProperties) GetValueOk() (*string, bool) { if o == nil { return nil, false } - return o.ResourceHref, true + return o.Value, true } -// SetResourceHref sets field value -func (o *LabelProperties) SetResourceHref(v string) { +// SetValue sets field value +func (o *LabelProperties) SetValue(v string) { - o.ResourceHref = &v + o.Value = &v } -// HasResourceHref returns a boolean if a field has been set. -func (o *LabelProperties) HasResourceHref() bool { - if o != nil && o.ResourceHref != nil { +// HasValue returns a boolean if a field has been set. +func (o *LabelProperties) HasValue() bool { + if o != nil && o.Value != nil { return true } @@ -241,18 +241,23 @@ func (o LabelProperties) MarshalJSON() ([]byte, error) { if o.Key != nil { toSerialize["key"] = o.Key } - if o.Value != nil { - toSerialize["value"] = o.Value + + if o.ResourceHref != nil { + toSerialize["resourceHref"] = o.ResourceHref } + if o.ResourceId != nil { toSerialize["resourceId"] = o.ResourceId } + if o.ResourceType != nil { toSerialize["resourceType"] = o.ResourceType } - if o.ResourceHref != nil { - toSerialize["resourceHref"] = o.ResourceHref + + if o.Value != nil { + toSerialize["value"] = o.Value } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource.go index 29ebef96dfe6..9963122acc93 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource.go @@ -16,14 +16,14 @@ import ( // LabelResource struct for LabelResource type LabelResource struct { - // Label on a resource is identified using label key. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // Label on a resource is identified using label key. + Id *string `json:"id,omitempty"` Metadata *NoStateMetaData `json:"metadata,omitempty"` Properties *LabelResourceProperties `json:"properties"` + // The type of object that has been created. + Type *string `json:"type,omitempty"` } // NewLabelResource instantiates a new LabelResource object @@ -46,190 +46,190 @@ func NewLabelResourceWithDefaults() *LabelResource { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelResource) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *LabelResource) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResource) GetIdOk() (*string, bool) { +func (o *LabelResource) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *LabelResource) SetId(v string) { +// SetHref sets field value +func (o *LabelResource) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *LabelResource) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *LabelResource) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelResource) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *LabelResource) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResource) GetTypeOk() (*string, bool) { +func (o *LabelResource) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *LabelResource) SetType(v string) { +// SetId sets field value +func (o *LabelResource) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *LabelResource) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *LabelResource) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelResource) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *LabelResource) GetMetadata() *NoStateMetaData { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResource) GetHrefOk() (*string, bool) { +func (o *LabelResource) GetMetadataOk() (*NoStateMetaData, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *LabelResource) SetHref(v string) { +// SetMetadata sets field value +func (o *LabelResource) SetMetadata(v NoStateMetaData) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *LabelResource) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *LabelResource) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for NoStateMetaData will be returned -func (o *LabelResource) GetMetadata() *NoStateMetaData { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *LabelResource) GetProperties() *LabelResourceProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResource) GetMetadataOk() (*NoStateMetaData, bool) { +func (o *LabelResource) GetPropertiesOk() (*LabelResourceProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *LabelResource) SetMetadata(v NoStateMetaData) { +// SetProperties sets field value +func (o *LabelResource) SetProperties(v LabelResourceProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *LabelResource) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *LabelResource) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for LabelResourceProperties will be returned -func (o *LabelResource) GetProperties() *LabelResourceProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *LabelResource) GetType() *string { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResource) GetPropertiesOk() (*LabelResourceProperties, bool) { +func (o *LabelResource) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *LabelResource) SetProperties(v LabelResourceProperties) { +// SetType sets field value +func (o *LabelResource) SetType(v string) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *LabelResource) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *LabelResource) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *LabelResource) HasProperties() bool { func (o LabelResource) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource_properties.go index ef0836dff593..e83bc0c9fcd7 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resource_properties.go @@ -41,7 +41,7 @@ func NewLabelResourcePropertiesWithDefaults() *LabelResourceProperties { } // GetKey returns the Key field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LabelResourceProperties) GetKey() *string { if o == nil { return nil @@ -79,7 +79,7 @@ func (o *LabelResourceProperties) HasKey() bool { } // GetValue returns the Value field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LabelResourceProperties) GetValue() *string { if o == nil { return nil @@ -121,9 +121,11 @@ func (o LabelResourceProperties) MarshalJSON() ([]byte, error) { if o.Key != nil { toSerialize["key"] = o.Key } + if o.Value != nil { toSerialize["value"] = o.Value } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resources.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resources.go index 673f4f3283f8..43bf07e052de 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resources.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_label_resources.go @@ -16,19 +16,19 @@ import ( // LabelResources struct for LabelResources type LabelResources struct { - // A unique representation of the label as a resource collection. - Id *string `json:"id,omitempty"` - // The type of resource within a collection. - Type *string `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` + // A unique representation of the label as a resource collection. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]LabelResource `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of resource within a collection. + Type *string `json:"type,omitempty"` } // NewLabelResources instantiates a new LabelResources object @@ -49,114 +49,114 @@ func NewLabelResourcesWithDefaults() *LabelResources { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelResources) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *LabelResources) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResources) GetIdOk() (*string, bool) { +func (o *LabelResources) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *LabelResources) SetId(v string) { +// SetLinks sets field value +func (o *LabelResources) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *LabelResources) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *LabelResources) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelResources) GetType() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *LabelResources) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResources) GetTypeOk() (*string, bool) { +func (o *LabelResources) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *LabelResources) SetType(v string) { +// SetHref sets field value +func (o *LabelResources) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *LabelResources) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *LabelResources) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LabelResources) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *LabelResources) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResources) GetHrefOk() (*string, bool) { +func (o *LabelResources) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *LabelResources) SetHref(v string) { +// SetId sets field value +func (o *LabelResources) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *LabelResources) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *LabelResources) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *LabelResources) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []LabelResource will be returned +// If the value is explicit nil, nil is returned func (o *LabelResources) GetItems() *[]LabelResource { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *LabelResources) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *LabelResources) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *LabelResources) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResources) GetOffsetOk() (*float32, bool) { +func (o *LabelResources) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *LabelResources) SetOffset(v float32) { +// SetLimit sets field value +func (o *LabelResources) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *LabelResources) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *LabelResources) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *LabelResources) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *LabelResources) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResources) GetLimitOk() (*float32, bool) { +func (o *LabelResources) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *LabelResources) SetLimit(v float32) { +// SetOffset sets field value +func (o *LabelResources) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *LabelResources) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *LabelResources) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *LabelResources) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *LabelResources) GetType() *string { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LabelResources) GetLinksOk() (*PaginationLinks, bool) { +func (o *LabelResources) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *LabelResources) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *LabelResources) SetType(v string) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *LabelResources) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *LabelResources) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *LabelResources) HasLinks() bool { func (o LabelResources) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_labels.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_labels.go index d83bdbcfcd44..f2be7da33b5a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_labels.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_labels.go @@ -16,14 +16,14 @@ import ( // Labels struct for Labels type Labels struct { - // A unique representation of the label as a resource collection. - Id *string `json:"id,omitempty"` - // The type of resource within a collection. - Type *string `json:"type,omitempty"` // URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` + // A unique representation of the label as a resource collection. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Label `json:"items,omitempty"` + // The type of resource within a collection. + Type *string `json:"type,omitempty"` } // NewLabels instantiates a new Labels object @@ -44,152 +44,152 @@ func NewLabelsWithDefaults() *Labels { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Labels) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Labels) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Labels) GetIdOk() (*string, bool) { +func (o *Labels) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Labels) SetId(v string) { +// SetHref sets field value +func (o *Labels) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Labels) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Labels) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Labels) GetType() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Labels) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Labels) GetTypeOk() (*string, bool) { +func (o *Labels) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Labels) SetType(v string) { +// SetId sets field value +func (o *Labels) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Labels) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Labels) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Labels) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Labels) GetItems() *[]Label { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Labels) GetHrefOk() (*string, bool) { +func (o *Labels) GetItemsOk() (*[]Label, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Labels) SetHref(v string) { +// SetItems sets field value +func (o *Labels) SetItems(v []Label) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Labels) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Labels) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Label will be returned -func (o *Labels) GetItems() *[]Label { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Labels) GetType() *string { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Labels) GetItemsOk() (*[]Label, bool) { +func (o *Labels) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Labels) SetItems(v []Label) { +// SetType sets field value +func (o *Labels) SetType(v string) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Labels) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Labels) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Labels) HasItems() bool { func (o Labels) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan.go index 120c2f17f535..09a44f4e3753 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan.go @@ -16,15 +16,15 @@ import ( // Lan struct for Lan type Lan struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *LanEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *LanProperties `json:"properties"` - Entities *LanEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLan instantiates a new Lan object @@ -47,114 +47,114 @@ func NewLanWithDefaults() *Lan { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Lan) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Lan) GetEntities() *LanEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lan) GetIdOk() (*string, bool) { +func (o *Lan) GetEntitiesOk() (*LanEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Lan) SetId(v string) { +// SetEntities sets field value +func (o *Lan) SetEntities(v LanEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Lan) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Lan) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Lan) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Lan) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lan) GetTypeOk() (*Type, bool) { +func (o *Lan) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Lan) SetType(v Type) { +// SetHref sets field value +func (o *Lan) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Lan) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Lan) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Lan) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Lan) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lan) GetHrefOk() (*string, bool) { +func (o *Lan) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Lan) SetHref(v string) { +// SetId sets field value +func (o *Lan) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Lan) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Lan) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *Lan) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *Lan) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *Lan) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for LanProperties will be returned +// If the value is explicit nil, nil is returned func (o *Lan) GetProperties() *LanProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *Lan) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for LanEntities will be returned -func (o *Lan) GetEntities() *LanEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Lan) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lan) GetEntitiesOk() (*LanEntities, bool) { +func (o *Lan) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Lan) SetEntities(v LanEntities) { +// SetType sets field value +func (o *Lan) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Lan) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Lan) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *Lan) HasEntities() bool { func (o Lan) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_entities.go index f4d242ac8118..368746a43236 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_entities.go @@ -38,7 +38,7 @@ func NewLanEntitiesWithDefaults() *LanEntities { } // GetNics returns the Nics field value -// If the value is explicit nil, the zero value for LanNics will be returned +// If the value is explicit nil, nil is returned func (o *LanEntities) GetNics() *LanNics { if o == nil { return nil @@ -80,6 +80,7 @@ func (o LanEntities) MarshalJSON() ([]byte, error) { if o.Nics != nil { toSerialize["nics"] = o.Nics } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_nics.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_nics.go index f348c1458a45..06cc683fe5f5 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_nics.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_nics.go @@ -16,19 +16,19 @@ import ( // LanNics struct for LanNics type LanNics struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Nic `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLanNics instantiates a new LanNics object @@ -49,114 +49,114 @@ func NewLanNicsWithDefaults() *LanNics { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LanNics) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *LanNics) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanNics) GetIdOk() (*string, bool) { +func (o *LanNics) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *LanNics) SetId(v string) { +// SetLinks sets field value +func (o *LanNics) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *LanNics) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *LanNics) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *LanNics) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *LanNics) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanNics) GetTypeOk() (*Type, bool) { +func (o *LanNics) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *LanNics) SetType(v Type) { +// SetHref sets field value +func (o *LanNics) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *LanNics) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *LanNics) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LanNics) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *LanNics) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanNics) GetHrefOk() (*string, bool) { +func (o *LanNics) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *LanNics) SetHref(v string) { +// SetId sets field value +func (o *LanNics) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *LanNics) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *LanNics) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *LanNics) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Nic will be returned +// If the value is explicit nil, nil is returned func (o *LanNics) GetItems() *[]Nic { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *LanNics) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *LanNics) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *LanNics) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanNics) GetOffsetOk() (*float32, bool) { +func (o *LanNics) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *LanNics) SetOffset(v float32) { +// SetLimit sets field value +func (o *LanNics) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *LanNics) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *LanNics) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *LanNics) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *LanNics) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanNics) GetLimitOk() (*float32, bool) { +func (o *LanNics) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *LanNics) SetLimit(v float32) { +// SetOffset sets field value +func (o *LanNics) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *LanNics) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *LanNics) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *LanNics) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *LanNics) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanNics) GetLinksOk() (*PaginationLinks, bool) { +func (o *LanNics) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *LanNics) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *LanNics) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *LanNics) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *LanNics) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *LanNics) HasLinks() bool { func (o LanNics) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_post.go index 3af870c67363..ce97f15f0273 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_post.go @@ -16,15 +16,15 @@ import ( // LanPost struct for LanPost type LanPost struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *LanEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` - Entities *LanEntities `json:"entities,omitempty"` Properties *LanPropertiesPost `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLanPost instantiates a new LanPost object @@ -47,114 +47,114 @@ func NewLanPostWithDefaults() *LanPost { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LanPost) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *LanPost) GetEntities() *LanEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPost) GetIdOk() (*string, bool) { +func (o *LanPost) GetEntitiesOk() (*LanEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *LanPost) SetId(v string) { +// SetEntities sets field value +func (o *LanPost) SetEntities(v LanEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *LanPost) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *LanPost) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *LanPost) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *LanPost) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPost) GetTypeOk() (*Type, bool) { +func (o *LanPost) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *LanPost) SetType(v Type) { +// SetHref sets field value +func (o *LanPost) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *LanPost) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *LanPost) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LanPost) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *LanPost) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPost) GetHrefOk() (*string, bool) { +func (o *LanPost) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *LanPost) SetHref(v string) { +// SetId sets field value +func (o *LanPost) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *LanPost) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *LanPost) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *LanPost) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *LanPost) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -199,76 +199,76 @@ func (o *LanPost) HasMetadata() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for LanEntities will be returned -func (o *LanPost) GetEntities() *LanEntities { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *LanPost) GetProperties() *LanPropertiesPost { if o == nil { return nil } - return o.Entities + return o.Properties } -// GetEntitiesOk returns a tuple with the Entities field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPost) GetEntitiesOk() (*LanEntities, bool) { +func (o *LanPost) GetPropertiesOk() (*LanPropertiesPost, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Properties, true } -// SetEntities sets field value -func (o *LanPost) SetEntities(v LanEntities) { +// SetProperties sets field value +func (o *LanPost) SetProperties(v LanPropertiesPost) { - o.Entities = &v + o.Properties = &v } -// HasEntities returns a boolean if a field has been set. -func (o *LanPost) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasProperties returns a boolean if a field has been set. +func (o *LanPost) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for LanPropertiesPost will be returned -func (o *LanPost) GetProperties() *LanPropertiesPost { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *LanPost) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPost) GetPropertiesOk() (*LanPropertiesPost, bool) { +func (o *LanPost) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *LanPost) SetProperties(v LanPropertiesPost) { +// SetType sets field value +func (o *LanPost) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *LanPost) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *LanPost) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *LanPost) HasProperties() bool { func (o LanPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } - if o.Entities != nil { - toSerialize["entities"] = o.Entities - } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties.go index 763ced62b1d3..141f0e1d1981 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties.go @@ -16,10 +16,13 @@ import ( // LanProperties struct for LanProperties type LanProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` // IP failover configurations for lan IpFailover *[]IPFailover `json:"ipFailover,omitempty"` + // For a GET request, this value is either 'null' or contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled. For POST/PUT/PATCH requests, 'AUTO' will result in enabling this LAN for IPv6 and automatically assign a /64 IPv6 CIDR block to this LAN and /80 IPv6 CIDR blocks to the NICs and one /128 IPv6 address to each connected NIC. If you choose the IPv6 CIDR block for the LAN on your own, then you must provide a /64 block, which is inside the IPv6 CIDR block of the virtual datacenter and unique inside all LANs from this virtual datacenter. If you enable IPv6 on a LAN with NICs, those NICs will get a /80 IPv6 CIDR block and one IPv6 address assigned to each automatically, unless you specify them explicitly on the LAN and on the NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` + Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` // The unique identifier of the private Cross-Connect the LAN is connected to, if any. Pcc *string `json:"pcc,omitempty"` // This LAN faces the public Internet. @@ -44,76 +47,119 @@ func NewLanPropertiesWithDefaults() *LanProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LanProperties) GetName() *string { +// GetIpFailover returns the IpFailover field value +// If the value is explicit nil, nil is returned +func (o *LanProperties) GetIpFailover() *[]IPFailover { if o == nil { return nil } - return o.Name + return o.IpFailover } -// GetNameOk returns a tuple with the Name field value +// GetIpFailoverOk returns a tuple with the IpFailover field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanProperties) GetNameOk() (*string, bool) { +func (o *LanProperties) GetIpFailoverOk() (*[]IPFailover, bool) { if o == nil { return nil, false } - return o.Name, true + return o.IpFailover, true } -// SetName sets field value -func (o *LanProperties) SetName(v string) { +// SetIpFailover sets field value +func (o *LanProperties) SetIpFailover(v []IPFailover) { - o.Name = &v + o.IpFailover = &v } -// HasName returns a boolean if a field has been set. -func (o *LanProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasIpFailover returns a boolean if a field has been set. +func (o *LanProperties) HasIpFailover() bool { + if o != nil && o.IpFailover != nil { return true } return false } -// GetIpFailover returns the IpFailover field value -// If the value is explicit nil, the zero value for []IPFailover will be returned -func (o *LanProperties) GetIpFailover() *[]IPFailover { +// GetIpv6CidrBlock returns the Ipv6CidrBlock field value +// If the value is explicit nil, nil is returned +func (o *LanProperties) GetIpv6CidrBlock() *string { if o == nil { return nil } - return o.IpFailover + return o.Ipv6CidrBlock } -// GetIpFailoverOk returns a tuple with the IpFailover field value +// GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanProperties) GetIpFailoverOk() (*[]IPFailover, bool) { +func (o *LanProperties) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } - return o.IpFailover, true + return o.Ipv6CidrBlock, true } -// SetIpFailover sets field value -func (o *LanProperties) SetIpFailover(v []IPFailover) { +// SetIpv6CidrBlock sets field value +func (o *LanProperties) SetIpv6CidrBlock(v string) { - o.IpFailover = &v + o.Ipv6CidrBlock = &v } -// HasIpFailover returns a boolean if a field has been set. -func (o *LanProperties) HasIpFailover() bool { - if o != nil && o.IpFailover != nil { +// sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled +func (o *LanProperties) SetIpv6CidrBlockNil() { + o.Ipv6CidrBlock = &Nilstring +} + +// HasIpv6CidrBlock returns a boolean if a field has been set. +func (o *LanProperties) HasIpv6CidrBlock() bool { + if o != nil && o.Ipv6CidrBlock != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *LanProperties) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LanProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *LanProperties) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *LanProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -121,7 +167,7 @@ func (o *LanProperties) HasIpFailover() bool { } // GetPcc returns the Pcc field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LanProperties) GetPcc() *string { if o == nil { return nil @@ -159,7 +205,7 @@ func (o *LanProperties) HasPcc() bool { } // GetPublic returns the Public field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *LanProperties) GetPublic() *bool { if o == nil { return nil @@ -198,18 +244,27 @@ func (o *LanProperties) HasPublic() bool { func (o LanProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } if o.IpFailover != nil { toSerialize["ipFailover"] = o.IpFailover } + + if o.Ipv6CidrBlock == &Nilstring { + toSerialize["ipv6CidrBlock"] = nil + } else if o.Ipv6CidrBlock != nil { + toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Pcc != nil { toSerialize["pcc"] = o.Pcc } + if o.Public != nil { toSerialize["public"] = o.Public } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties_post.go index 3492c2079ae0..a7da1b9f7285 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lan_properties_post.go @@ -16,10 +16,13 @@ import ( // LanPropertiesPost struct for LanPropertiesPost type LanPropertiesPost struct { - // The name of the resource. - Name *string `json:"name,omitempty"` // IP failover configurations for lan IpFailover *[]IPFailover `json:"ipFailover,omitempty"` + // For a GET request, this value is either 'null' or contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6-enabled. For POST/PUT/PATCH requests, 'AUTO' will result in enabling this LAN for IPv6 and automatically assign a /64 IPv6 CIDR block to this LAN. If you choose the IPv6 CIDR block on your own, then you must provide a /64 block, which is inside the IPv6 CIDR block of the virtual datacenter and unique inside all LANs from this virtual datacenter. If you enable IPv6 on a LAN with NICs, those NICs will get a /80 IPv6 CIDR block and one IPv6 address assigned to each automatically, unless you specify them explicitly on the NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` + Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` // The unique identifier of the private Cross-Connect the LAN is connected to, if any. Pcc *string `json:"pcc,omitempty"` // This LAN faces the public Internet. @@ -44,76 +47,119 @@ func NewLanPropertiesPostWithDefaults() *LanPropertiesPost { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LanPropertiesPost) GetName() *string { +// GetIpFailover returns the IpFailover field value +// If the value is explicit nil, nil is returned +func (o *LanPropertiesPost) GetIpFailover() *[]IPFailover { if o == nil { return nil } - return o.Name + return o.IpFailover } -// GetNameOk returns a tuple with the Name field value +// GetIpFailoverOk returns a tuple with the IpFailover field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPropertiesPost) GetNameOk() (*string, bool) { +func (o *LanPropertiesPost) GetIpFailoverOk() (*[]IPFailover, bool) { if o == nil { return nil, false } - return o.Name, true + return o.IpFailover, true } -// SetName sets field value -func (o *LanPropertiesPost) SetName(v string) { +// SetIpFailover sets field value +func (o *LanPropertiesPost) SetIpFailover(v []IPFailover) { - o.Name = &v + o.IpFailover = &v } -// HasName returns a boolean if a field has been set. -func (o *LanPropertiesPost) HasName() bool { - if o != nil && o.Name != nil { +// HasIpFailover returns a boolean if a field has been set. +func (o *LanPropertiesPost) HasIpFailover() bool { + if o != nil && o.IpFailover != nil { return true } return false } -// GetIpFailover returns the IpFailover field value -// If the value is explicit nil, the zero value for []IPFailover will be returned -func (o *LanPropertiesPost) GetIpFailover() *[]IPFailover { +// GetIpv6CidrBlock returns the Ipv6CidrBlock field value +// If the value is explicit nil, nil is returned +func (o *LanPropertiesPost) GetIpv6CidrBlock() *string { if o == nil { return nil } - return o.IpFailover + return o.Ipv6CidrBlock } -// GetIpFailoverOk returns a tuple with the IpFailover field value +// GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LanPropertiesPost) GetIpFailoverOk() (*[]IPFailover, bool) { +func (o *LanPropertiesPost) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } - return o.IpFailover, true + return o.Ipv6CidrBlock, true } -// SetIpFailover sets field value -func (o *LanPropertiesPost) SetIpFailover(v []IPFailover) { +// SetIpv6CidrBlock sets field value +func (o *LanPropertiesPost) SetIpv6CidrBlock(v string) { - o.IpFailover = &v + o.Ipv6CidrBlock = &v } -// HasIpFailover returns a boolean if a field has been set. -func (o *LanPropertiesPost) HasIpFailover() bool { - if o != nil && o.IpFailover != nil { +// sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled +func (o *LanPropertiesPost) SetIpv6CidrBlockNil() { + o.Ipv6CidrBlock = &Nilstring +} + +// HasIpv6CidrBlock returns a boolean if a field has been set. +func (o *LanPropertiesPost) HasIpv6CidrBlock() bool { + if o != nil && o.Ipv6CidrBlock != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *LanPropertiesPost) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LanPropertiesPost) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *LanPropertiesPost) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *LanPropertiesPost) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -121,7 +167,7 @@ func (o *LanPropertiesPost) HasIpFailover() bool { } // GetPcc returns the Pcc field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LanPropertiesPost) GetPcc() *string { if o == nil { return nil @@ -159,7 +205,7 @@ func (o *LanPropertiesPost) HasPcc() bool { } // GetPublic returns the Public field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *LanPropertiesPost) GetPublic() *bool { if o == nil { return nil @@ -198,18 +244,27 @@ func (o *LanPropertiesPost) HasPublic() bool { func (o LanPropertiesPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } if o.IpFailover != nil { toSerialize["ipFailover"] = o.IpFailover } + + if o.Ipv6CidrBlock == &Nilstring { + toSerialize["ipv6CidrBlock"] = nil + } else if o.Ipv6CidrBlock != nil { + toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Pcc != nil { toSerialize["pcc"] = o.Pcc } + if o.Public != nil { toSerialize["public"] = o.Public } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lans.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lans.go index 361b3809f924..b0ee52ca2fd0 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lans.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_lans.go @@ -16,19 +16,19 @@ import ( // Lans struct for Lans type Lans struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Lan `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLans instantiates a new Lans object @@ -49,114 +49,114 @@ func NewLansWithDefaults() *Lans { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Lans) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Lans) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lans) GetIdOk() (*string, bool) { +func (o *Lans) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Lans) SetId(v string) { +// SetLinks sets field value +func (o *Lans) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Lans) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Lans) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Lans) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Lans) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lans) GetTypeOk() (*Type, bool) { +func (o *Lans) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Lans) SetType(v Type) { +// SetHref sets field value +func (o *Lans) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Lans) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Lans) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Lans) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Lans) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lans) GetHrefOk() (*string, bool) { +func (o *Lans) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Lans) SetHref(v string) { +// SetId sets field value +func (o *Lans) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Lans) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Lans) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Lans) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Lan will be returned +// If the value is explicit nil, nil is returned func (o *Lans) GetItems() *[]Lan { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Lans) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Lans) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Lans) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lans) GetOffsetOk() (*float32, bool) { +func (o *Lans) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Lans) SetOffset(v float32) { +// SetLimit sets field value +func (o *Lans) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Lans) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Lans) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Lans) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Lans) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lans) GetLimitOk() (*float32, bool) { +func (o *Lans) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Lans) SetLimit(v float32) { +// SetOffset sets field value +func (o *Lans) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Lans) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Lans) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Lans) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Lans) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Lans) GetLinksOk() (*PaginationLinks, bool) { +func (o *Lans) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Lans) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Lans) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Lans) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Lans) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Lans) HasLinks() bool { func (o Lans) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer.go index 822d7f1c38e2..064e5eb99621 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer.go @@ -16,15 +16,15 @@ import ( // Loadbalancer struct for Loadbalancer type Loadbalancer struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *LoadbalancerEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *LoadbalancerProperties `json:"properties"` - Entities *LoadbalancerEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLoadbalancer instantiates a new Loadbalancer object @@ -47,114 +47,114 @@ func NewLoadbalancerWithDefaults() *Loadbalancer { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Loadbalancer) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancer) GetEntities() *LoadbalancerEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancer) GetIdOk() (*string, bool) { +func (o *Loadbalancer) GetEntitiesOk() (*LoadbalancerEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Loadbalancer) SetId(v string) { +// SetEntities sets field value +func (o *Loadbalancer) SetEntities(v LoadbalancerEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Loadbalancer) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Loadbalancer) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Loadbalancer) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancer) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancer) GetTypeOk() (*Type, bool) { +func (o *Loadbalancer) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Loadbalancer) SetType(v Type) { +// SetHref sets field value +func (o *Loadbalancer) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Loadbalancer) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Loadbalancer) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Loadbalancer) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancer) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancer) GetHrefOk() (*string, bool) { +func (o *Loadbalancer) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Loadbalancer) SetHref(v string) { +// SetId sets field value +func (o *Loadbalancer) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Loadbalancer) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Loadbalancer) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *Loadbalancer) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *Loadbalancer) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *Loadbalancer) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for LoadbalancerProperties will be returned +// If the value is explicit nil, nil is returned func (o *Loadbalancer) GetProperties() *LoadbalancerProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *Loadbalancer) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for LoadbalancerEntities will be returned -func (o *Loadbalancer) GetEntities() *LoadbalancerEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancer) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancer) GetEntitiesOk() (*LoadbalancerEntities, bool) { +func (o *Loadbalancer) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Loadbalancer) SetEntities(v LoadbalancerEntities) { +// SetType sets field value +func (o *Loadbalancer) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Loadbalancer) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Loadbalancer) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *Loadbalancer) HasEntities() bool { func (o Loadbalancer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_entities.go index 129844dcbd88..8a4c5049c9ad 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_entities.go @@ -38,7 +38,7 @@ func NewLoadbalancerEntitiesWithDefaults() *LoadbalancerEntities { } // GetBalancednics returns the Balancednics field value -// If the value is explicit nil, the zero value for BalancedNics will be returned +// If the value is explicit nil, nil is returned func (o *LoadbalancerEntities) GetBalancednics() *BalancedNics { if o == nil { return nil @@ -80,6 +80,7 @@ func (o LoadbalancerEntities) MarshalJSON() ([]byte, error) { if o.Balancednics != nil { toSerialize["balancednics"] = o.Balancednics } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_properties.go index e6b9b02fb282..9d1f3cee7ea0 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancer_properties.go @@ -16,12 +16,13 @@ import ( // LoadbalancerProperties struct for LoadbalancerProperties type LoadbalancerProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. - Ip *string `json:"ip,omitempty"` // Indicates if the loadbalancer will reserve an IP using DHCP. Dhcp *bool `json:"dhcp,omitempty"` + // IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpNil` + Ip *string `json:"ip,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` } // NewLoadbalancerProperties instantiates a new LoadbalancerProperties object @@ -42,38 +43,38 @@ func NewLoadbalancerPropertiesWithDefaults() *LoadbalancerProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LoadbalancerProperties) GetName() *string { +// GetDhcp returns the Dhcp field value +// If the value is explicit nil, nil is returned +func (o *LoadbalancerProperties) GetDhcp() *bool { if o == nil { return nil } - return o.Name + return o.Dhcp } -// GetNameOk returns a tuple with the Name field value +// GetDhcpOk returns a tuple with the Dhcp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LoadbalancerProperties) GetNameOk() (*string, bool) { +func (o *LoadbalancerProperties) GetDhcpOk() (*bool, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Dhcp, true } -// SetName sets field value -func (o *LoadbalancerProperties) SetName(v string) { +// SetDhcp sets field value +func (o *LoadbalancerProperties) SetDhcp(v bool) { - o.Name = &v + o.Dhcp = &v } -// HasName returns a boolean if a field has been set. -func (o *LoadbalancerProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasDhcp returns a boolean if a field has been set. +func (o *LoadbalancerProperties) HasDhcp() bool { + if o != nil && o.Dhcp != nil { return true } @@ -81,7 +82,7 @@ func (o *LoadbalancerProperties) HasName() bool { } // GetIp returns the Ip field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *LoadbalancerProperties) GetIp() *string { if o == nil { return nil @@ -109,6 +110,11 @@ func (o *LoadbalancerProperties) SetIp(v string) { } +// sets Ip to the explicit address that will be encoded as nil when marshaled +func (o *LoadbalancerProperties) SetIpNil() { + o.Ip = &Nilstring +} + // HasIp returns a boolean if a field has been set. func (o *LoadbalancerProperties) HasIp() bool { if o != nil && o.Ip != nil { @@ -118,38 +124,38 @@ func (o *LoadbalancerProperties) HasIp() bool { return false } -// GetDhcp returns the Dhcp field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *LoadbalancerProperties) GetDhcp() *bool { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *LoadbalancerProperties) GetName() *string { if o == nil { return nil } - return o.Dhcp + return o.Name } -// GetDhcpOk returns a tuple with the Dhcp field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LoadbalancerProperties) GetDhcpOk() (*bool, bool) { +func (o *LoadbalancerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Dhcp, true + return o.Name, true } -// SetDhcp sets field value -func (o *LoadbalancerProperties) SetDhcp(v bool) { +// SetName sets field value +func (o *LoadbalancerProperties) SetName(v string) { - o.Dhcp = &v + o.Name = &v } -// HasDhcp returns a boolean if a field has been set. -func (o *LoadbalancerProperties) HasDhcp() bool { - if o != nil && o.Dhcp != nil { +// HasName returns a boolean if a field has been set. +func (o *LoadbalancerProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -158,13 +164,19 @@ func (o *LoadbalancerProperties) HasDhcp() bool { func (o LoadbalancerProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - toSerialize["ip"] = o.Ip if o.Dhcp != nil { toSerialize["dhcp"] = o.Dhcp } + + if o.Ip == &Nilstring { + toSerialize["ip"] = nil + } else if o.Ip != nil { + toSerialize["ip"] = o.Ip + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancers.go index 166560f99b09..267eba36f4d3 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_loadbalancers.go @@ -16,19 +16,19 @@ import ( // Loadbalancers struct for Loadbalancers type Loadbalancers struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Loadbalancer `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLoadbalancers instantiates a new Loadbalancers object @@ -49,114 +49,114 @@ func NewLoadbalancersWithDefaults() *Loadbalancers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Loadbalancers) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancers) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancers) GetIdOk() (*string, bool) { +func (o *Loadbalancers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Loadbalancers) SetId(v string) { +// SetLinks sets field value +func (o *Loadbalancers) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Loadbalancers) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Loadbalancers) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Loadbalancers) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancers) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancers) GetTypeOk() (*Type, bool) { +func (o *Loadbalancers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Loadbalancers) SetType(v Type) { +// SetHref sets field value +func (o *Loadbalancers) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Loadbalancers) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Loadbalancers) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Loadbalancers) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancers) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancers) GetHrefOk() (*string, bool) { +func (o *Loadbalancers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Loadbalancers) SetHref(v string) { +// SetId sets field value +func (o *Loadbalancers) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Loadbalancers) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Loadbalancers) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Loadbalancers) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Loadbalancer will be returned +// If the value is explicit nil, nil is returned func (o *Loadbalancers) GetItems() *[]Loadbalancer { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Loadbalancers) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Loadbalancers) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancers) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancers) GetOffsetOk() (*float32, bool) { +func (o *Loadbalancers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Loadbalancers) SetOffset(v float32) { +// SetLimit sets field value +func (o *Loadbalancers) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Loadbalancers) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Loadbalancers) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Loadbalancers) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancers) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancers) GetLimitOk() (*float32, bool) { +func (o *Loadbalancers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Loadbalancers) SetLimit(v float32) { +// SetOffset sets field value +func (o *Loadbalancers) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Loadbalancers) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Loadbalancers) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Loadbalancers) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Loadbalancers) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Loadbalancers) GetLinksOk() (*PaginationLinks, bool) { +func (o *Loadbalancers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Loadbalancers) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Loadbalancers) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Loadbalancers) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Loadbalancers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Loadbalancers) HasLinks() bool { func (o Loadbalancers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location.go index 59a250d45297..379723ff1a9f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location.go @@ -16,14 +16,14 @@ import ( // Location struct for Location type Location struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *LocationProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLocation instantiates a new Location object @@ -46,190 +46,190 @@ func NewLocationWithDefaults() *Location { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Location) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Location) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Location) GetIdOk() (*string, bool) { +func (o *Location) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Location) SetId(v string) { +// SetHref sets field value +func (o *Location) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Location) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Location) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Location) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Location) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Location) GetTypeOk() (*Type, bool) { +func (o *Location) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Location) SetType(v Type) { +// SetId sets field value +func (o *Location) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Location) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Location) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Location) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Location) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Location) GetHrefOk() (*string, bool) { +func (o *Location) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Location) SetHref(v string) { +// SetMetadata sets field value +func (o *Location) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Location) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Location) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *Location) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Location) GetProperties() *LocationProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Location) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *Location) GetPropertiesOk() (*LocationProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Location) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *Location) SetProperties(v LocationProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Location) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Location) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for LocationProperties will be returned -func (o *Location) GetProperties() *LocationProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Location) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Location) GetPropertiesOk() (*LocationProperties, bool) { +func (o *Location) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Location) SetProperties(v LocationProperties) { +// SetType sets field value +func (o *Location) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Location) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Location) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Location) HasProperties() bool { func (o Location) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location_properties.go index 15326ccabd3c..95da4abb3967 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_location_properties.go @@ -16,14 +16,14 @@ import ( // LocationProperties struct for LocationProperties type LocationProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // List of features supported by the location + // A list of available CPU types and related resources available in the location. + CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"` + // A list of available features in the location. Features *[]string `json:"features,omitempty"` - // List of image aliases available for the location + // A list of image aliases available in the location. ImageAliases *[]string `json:"imageAliases,omitempty"` - // Array of features and CPU families available in a location - CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"` + // The location name. + Name *string `json:"name,omitempty"` } // NewLocationProperties instantiates a new LocationProperties object @@ -44,38 +44,38 @@ func NewLocationPropertiesWithDefaults() *LocationProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *LocationProperties) GetName() *string { +// GetCpuArchitecture returns the CpuArchitecture field value +// If the value is explicit nil, nil is returned +func (o *LocationProperties) GetCpuArchitecture() *[]CpuArchitectureProperties { if o == nil { return nil } - return o.Name + return o.CpuArchitecture } -// GetNameOk returns a tuple with the Name field value +// GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LocationProperties) GetNameOk() (*string, bool) { +func (o *LocationProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) { if o == nil { return nil, false } - return o.Name, true + return o.CpuArchitecture, true } -// SetName sets field value -func (o *LocationProperties) SetName(v string) { +// SetCpuArchitecture sets field value +func (o *LocationProperties) SetCpuArchitecture(v []CpuArchitectureProperties) { - o.Name = &v + o.CpuArchitecture = &v } -// HasName returns a boolean if a field has been set. -func (o *LocationProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasCpuArchitecture returns a boolean if a field has been set. +func (o *LocationProperties) HasCpuArchitecture() bool { + if o != nil && o.CpuArchitecture != nil { return true } @@ -83,7 +83,7 @@ func (o *LocationProperties) HasName() bool { } // GetFeatures returns the Features field value -// If the value is explicit nil, the zero value for []string will be returned +// If the value is explicit nil, nil is returned func (o *LocationProperties) GetFeatures() *[]string { if o == nil { return nil @@ -121,7 +121,7 @@ func (o *LocationProperties) HasFeatures() bool { } // GetImageAliases returns the ImageAliases field value -// If the value is explicit nil, the zero value for []string will be returned +// If the value is explicit nil, nil is returned func (o *LocationProperties) GetImageAliases() *[]string { if o == nil { return nil @@ -158,38 +158,38 @@ func (o *LocationProperties) HasImageAliases() bool { return false } -// GetCpuArchitecture returns the CpuArchitecture field value -// If the value is explicit nil, the zero value for []CpuArchitectureProperties will be returned -func (o *LocationProperties) GetCpuArchitecture() *[]CpuArchitectureProperties { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *LocationProperties) GetName() *string { if o == nil { return nil } - return o.CpuArchitecture + return o.Name } -// GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LocationProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) { +func (o *LocationProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.CpuArchitecture, true + return o.Name, true } -// SetCpuArchitecture sets field value -func (o *LocationProperties) SetCpuArchitecture(v []CpuArchitectureProperties) { +// SetName sets field value +func (o *LocationProperties) SetName(v string) { - o.CpuArchitecture = &v + o.Name = &v } -// HasCpuArchitecture returns a boolean if a field has been set. -func (o *LocationProperties) HasCpuArchitecture() bool { - if o != nil && o.CpuArchitecture != nil { +// HasName returns a boolean if a field has been set. +func (o *LocationProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -198,18 +198,22 @@ func (o *LocationProperties) HasCpuArchitecture() bool { func (o LocationProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.CpuArchitecture != nil { + toSerialize["cpuArchitecture"] = o.CpuArchitecture } + if o.Features != nil { toSerialize["features"] = o.Features } + if o.ImageAliases != nil { toSerialize["imageAliases"] = o.ImageAliases } - if o.CpuArchitecture != nil { - toSerialize["cpuArchitecture"] = o.CpuArchitecture + + if o.Name != nil { + toSerialize["name"] = o.Name } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_locations.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_locations.go index ba9354acec7b..d3311051b43c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_locations.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_locations.go @@ -16,14 +16,14 @@ import ( // Locations struct for Locations type Locations struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Location `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewLocations instantiates a new Locations object @@ -44,152 +44,152 @@ func NewLocationsWithDefaults() *Locations { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Locations) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Locations) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Locations) GetIdOk() (*string, bool) { +func (o *Locations) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Locations) SetId(v string) { +// SetHref sets field value +func (o *Locations) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Locations) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Locations) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Locations) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Locations) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Locations) GetTypeOk() (*Type, bool) { +func (o *Locations) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Locations) SetType(v Type) { +// SetId sets field value +func (o *Locations) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Locations) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Locations) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Locations) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Locations) GetItems() *[]Location { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Locations) GetHrefOk() (*string, bool) { +func (o *Locations) GetItemsOk() (*[]Location, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Locations) SetHref(v string) { +// SetItems sets field value +func (o *Locations) SetItems(v []Location) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Locations) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Locations) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Location will be returned -func (o *Locations) GetItems() *[]Location { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Locations) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Locations) GetItemsOk() (*[]Location, bool) { +func (o *Locations) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Locations) SetItems(v []Location) { +// SetType sets field value +func (o *Locations) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Locations) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Locations) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Locations) HasItems() bool { func (o Locations) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway.go index 70f8e92a9bda..2feaa609f98e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway.go @@ -16,15 +16,15 @@ import ( // NatGateway struct for NatGateway type NatGateway struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *NatGatewayEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NatGatewayProperties `json:"properties"` - Entities *NatGatewayEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNatGateway instantiates a new NatGateway object @@ -47,114 +47,114 @@ func NewNatGatewayWithDefaults() *NatGateway { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGateway) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *NatGateway) GetEntities() *NatGatewayEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateway) GetIdOk() (*string, bool) { +func (o *NatGateway) GetEntitiesOk() (*NatGatewayEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *NatGateway) SetId(v string) { +// SetEntities sets field value +func (o *NatGateway) SetEntities(v NatGatewayEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGateway) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *NatGateway) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NatGateway) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NatGateway) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateway) GetTypeOk() (*Type, bool) { +func (o *NatGateway) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *NatGateway) SetType(v Type) { +// SetHref sets field value +func (o *NatGateway) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGateway) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *NatGateway) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGateway) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGateway) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateway) GetHrefOk() (*string, bool) { +func (o *NatGateway) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *NatGateway) SetHref(v string) { +// SetId sets field value +func (o *NatGateway) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *NatGateway) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGateway) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *NatGateway) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *NatGateway) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *NatGateway) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NatGatewayProperties will be returned +// If the value is explicit nil, nil is returned func (o *NatGateway) GetProperties() *NatGatewayProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *NatGateway) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for NatGatewayEntities will be returned -func (o *NatGateway) GetEntities() *NatGatewayEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGateway) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateway) GetEntitiesOk() (*NatGatewayEntities, bool) { +func (o *NatGateway) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *NatGateway) SetEntities(v NatGatewayEntities) { +// SetType sets field value +func (o *NatGateway) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *NatGateway) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGateway) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *NatGateway) HasEntities() bool { func (o NatGateway) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_entities.go index d51cb9543ce1..94fae49c42a4 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_entities.go @@ -16,8 +16,8 @@ import ( // NatGatewayEntities struct for NatGatewayEntities type NatGatewayEntities struct { - Rules *NatGatewayRules `json:"rules,omitempty"` Flowlogs *FlowLogs `json:"flowlogs,omitempty"` + Rules *NatGatewayRules `json:"rules,omitempty"` } // NewNatGatewayEntities instantiates a new NatGatewayEntities object @@ -38,76 +38,76 @@ func NewNatGatewayEntitiesWithDefaults() *NatGatewayEntities { return &this } -// GetRules returns the Rules field value -// If the value is explicit nil, the zero value for NatGatewayRules will be returned -func (o *NatGatewayEntities) GetRules() *NatGatewayRules { +// GetFlowlogs returns the Flowlogs field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayEntities) GetFlowlogs() *FlowLogs { if o == nil { return nil } - return o.Rules + return o.Flowlogs } -// GetRulesOk returns a tuple with the Rules field value +// GetFlowlogsOk returns a tuple with the Flowlogs field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayEntities) GetRulesOk() (*NatGatewayRules, bool) { +func (o *NatGatewayEntities) GetFlowlogsOk() (*FlowLogs, bool) { if o == nil { return nil, false } - return o.Rules, true + return o.Flowlogs, true } -// SetRules sets field value -func (o *NatGatewayEntities) SetRules(v NatGatewayRules) { +// SetFlowlogs sets field value +func (o *NatGatewayEntities) SetFlowlogs(v FlowLogs) { - o.Rules = &v + o.Flowlogs = &v } -// HasRules returns a boolean if a field has been set. -func (o *NatGatewayEntities) HasRules() bool { - if o != nil && o.Rules != nil { +// HasFlowlogs returns a boolean if a field has been set. +func (o *NatGatewayEntities) HasFlowlogs() bool { + if o != nil && o.Flowlogs != nil { return true } return false } -// GetFlowlogs returns the Flowlogs field value -// If the value is explicit nil, the zero value for FlowLogs will be returned -func (o *NatGatewayEntities) GetFlowlogs() *FlowLogs { +// GetRules returns the Rules field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayEntities) GetRules() *NatGatewayRules { if o == nil { return nil } - return o.Flowlogs + return o.Rules } -// GetFlowlogsOk returns a tuple with the Flowlogs field value +// GetRulesOk returns a tuple with the Rules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayEntities) GetFlowlogsOk() (*FlowLogs, bool) { +func (o *NatGatewayEntities) GetRulesOk() (*NatGatewayRules, bool) { if o == nil { return nil, false } - return o.Flowlogs, true + return o.Rules, true } -// SetFlowlogs sets field value -func (o *NatGatewayEntities) SetFlowlogs(v FlowLogs) { +// SetRules sets field value +func (o *NatGatewayEntities) SetRules(v NatGatewayRules) { - o.Flowlogs = &v + o.Rules = &v } -// HasFlowlogs returns a boolean if a field has been set. -func (o *NatGatewayEntities) HasFlowlogs() bool { - if o != nil && o.Flowlogs != nil { +// HasRules returns a boolean if a field has been set. +func (o *NatGatewayEntities) HasRules() bool { + if o != nil && o.Rules != nil { return true } @@ -116,12 +116,14 @@ func (o *NatGatewayEntities) HasFlowlogs() bool { func (o NatGatewayEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Rules != nil { - toSerialize["rules"] = o.Rules - } if o.Flowlogs != nil { toSerialize["flowlogs"] = o.Flowlogs } + + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_lan_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_lan_properties.go index 007a57d69036..068b141bebbf 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_lan_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_lan_properties.go @@ -16,10 +16,10 @@ import ( // NatGatewayLanProperties struct for NatGatewayLanProperties type NatGatewayLanProperties struct { - // Id for the LAN connected to the NAT Gateway - Id *int32 `json:"id"` // Collection of gateway IP addresses of the NAT Gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN GatewayIps *[]string `json:"gatewayIps,omitempty"` + // Id for the LAN connected to the NAT Gateway + Id *int32 `json:"id"` } // NewNatGatewayLanProperties instantiates a new NatGatewayLanProperties object @@ -42,76 +42,76 @@ func NewNatGatewayLanPropertiesWithDefaults() *NatGatewayLanProperties { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NatGatewayLanProperties) GetId() *int32 { +// GetGatewayIps returns the GatewayIps field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayLanProperties) GetGatewayIps() *[]string { if o == nil { return nil } - return o.Id + return o.GatewayIps } -// GetIdOk returns a tuple with the Id field value +// GetGatewayIpsOk returns a tuple with the GatewayIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayLanProperties) GetIdOk() (*int32, bool) { +func (o *NatGatewayLanProperties) GetGatewayIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.GatewayIps, true } -// SetId sets field value -func (o *NatGatewayLanProperties) SetId(v int32) { +// SetGatewayIps sets field value +func (o *NatGatewayLanProperties) SetGatewayIps(v []string) { - o.Id = &v + o.GatewayIps = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGatewayLanProperties) HasId() bool { - if o != nil && o.Id != nil { +// HasGatewayIps returns a boolean if a field has been set. +func (o *NatGatewayLanProperties) HasGatewayIps() bool { + if o != nil && o.GatewayIps != nil { return true } return false } -// GetGatewayIps returns the GatewayIps field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *NatGatewayLanProperties) GetGatewayIps() *[]string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayLanProperties) GetId() *int32 { if o == nil { return nil } - return o.GatewayIps + return o.Id } -// GetGatewayIpsOk returns a tuple with the GatewayIps field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayLanProperties) GetGatewayIpsOk() (*[]string, bool) { +func (o *NatGatewayLanProperties) GetIdOk() (*int32, bool) { if o == nil { return nil, false } - return o.GatewayIps, true + return o.Id, true } -// SetGatewayIps sets field value -func (o *NatGatewayLanProperties) SetGatewayIps(v []string) { +// SetId sets field value +func (o *NatGatewayLanProperties) SetId(v int32) { - o.GatewayIps = &v + o.Id = &v } -// HasGatewayIps returns a boolean if a field has been set. -func (o *NatGatewayLanProperties) HasGatewayIps() bool { - if o != nil && o.GatewayIps != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGatewayLanProperties) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -120,12 +120,14 @@ func (o *NatGatewayLanProperties) HasGatewayIps() bool { func (o NatGatewayLanProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } if o.GatewayIps != nil { toSerialize["gatewayIps"] = o.GatewayIps } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_properties.go index 6eea997ef315..ad784ad9f973 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_properties.go @@ -16,12 +16,12 @@ import ( // NatGatewayProperties struct for NatGatewayProperties type NatGatewayProperties struct { + // Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. + Lans *[]NatGatewayLanProperties `json:"lans,omitempty"` // Name of the NAT Gateway. Name *string `json:"name"` // Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location. PublicIps *[]string `json:"publicIps"` - // Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. - Lans *[]NatGatewayLanProperties `json:"lans,omitempty"` } // NewNatGatewayProperties instantiates a new NatGatewayProperties object @@ -45,114 +45,114 @@ func NewNatGatewayPropertiesWithDefaults() *NatGatewayProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayProperties) GetName() *string { +// GetLans returns the Lans field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayProperties) GetLans() *[]NatGatewayLanProperties { if o == nil { return nil } - return o.Name + return o.Lans } -// GetNameOk returns a tuple with the Name field value +// GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayProperties) GetNameOk() (*string, bool) { +func (o *NatGatewayProperties) GetLansOk() (*[]NatGatewayLanProperties, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Lans, true } -// SetName sets field value -func (o *NatGatewayProperties) SetName(v string) { +// SetLans sets field value +func (o *NatGatewayProperties) SetLans(v []NatGatewayLanProperties) { - o.Name = &v + o.Lans = &v } -// HasName returns a boolean if a field has been set. -func (o *NatGatewayProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasLans returns a boolean if a field has been set. +func (o *NatGatewayProperties) HasLans() bool { + if o != nil && o.Lans != nil { return true } return false } -// GetPublicIps returns the PublicIps field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *NatGatewayProperties) GetPublicIps() *[]string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayProperties) GetName() *string { if o == nil { return nil } - return o.PublicIps + return o.Name } -// GetPublicIpsOk returns a tuple with the PublicIps field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayProperties) GetPublicIpsOk() (*[]string, bool) { +func (o *NatGatewayProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.PublicIps, true + return o.Name, true } -// SetPublicIps sets field value -func (o *NatGatewayProperties) SetPublicIps(v []string) { +// SetName sets field value +func (o *NatGatewayProperties) SetName(v string) { - o.PublicIps = &v + o.Name = &v } -// HasPublicIps returns a boolean if a field has been set. -func (o *NatGatewayProperties) HasPublicIps() bool { - if o != nil && o.PublicIps != nil { +// HasName returns a boolean if a field has been set. +func (o *NatGatewayProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetLans returns the Lans field value -// If the value is explicit nil, the zero value for []NatGatewayLanProperties will be returned -func (o *NatGatewayProperties) GetLans() *[]NatGatewayLanProperties { +// GetPublicIps returns the PublicIps field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayProperties) GetPublicIps() *[]string { if o == nil { return nil } - return o.Lans + return o.PublicIps } -// GetLansOk returns a tuple with the Lans field value +// GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayProperties) GetLansOk() (*[]NatGatewayLanProperties, bool) { +func (o *NatGatewayProperties) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Lans, true + return o.PublicIps, true } -// SetLans sets field value -func (o *NatGatewayProperties) SetLans(v []NatGatewayLanProperties) { +// SetPublicIps sets field value +func (o *NatGatewayProperties) SetPublicIps(v []string) { - o.Lans = &v + o.PublicIps = &v } -// HasLans returns a boolean if a field has been set. -func (o *NatGatewayProperties) HasLans() bool { - if o != nil && o.Lans != nil { +// HasPublicIps returns a boolean if a field has been set. +func (o *NatGatewayProperties) HasPublicIps() bool { + if o != nil && o.PublicIps != nil { return true } @@ -161,15 +161,18 @@ func (o *NatGatewayProperties) HasLans() bool { func (o NatGatewayProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.Lans != nil { + toSerialize["lans"] = o.Lans + } + if o.Name != nil { toSerialize["name"] = o.Name } + if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } - if o.Lans != nil { - toSerialize["lans"] = o.Lans - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_put.go index cf9a8a0486ff..5bd37720efbb 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_put.go @@ -16,13 +16,13 @@ import ( // NatGatewayPut struct for NatGatewayPut type NatGatewayPut struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *NatGatewayProperties `json:"properties"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *NatGatewayProperties `json:"properties"` } // NewNatGatewayPut instantiates a new NatGatewayPut object @@ -45,152 +45,152 @@ func NewNatGatewayPutWithDefaults() *NatGatewayPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayPut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayPut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayPut) GetIdOk() (*string, bool) { +func (o *NatGatewayPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NatGatewayPut) SetId(v string) { +// SetHref sets field value +func (o *NatGatewayPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGatewayPut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NatGatewayPut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NatGatewayPut) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayPut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayPut) GetTypeOk() (*Type, bool) { +func (o *NatGatewayPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NatGatewayPut) SetType(v Type) { +// SetId sets field value +func (o *NatGatewayPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGatewayPut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGatewayPut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayPut) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayPut) GetProperties() *NatGatewayProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayPut) GetHrefOk() (*string, bool) { +func (o *NatGatewayPut) GetPropertiesOk() (*NatGatewayProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *NatGatewayPut) SetHref(v string) { +// SetProperties sets field value +func (o *NatGatewayPut) SetProperties(v NatGatewayProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *NatGatewayPut) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NatGatewayPut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NatGatewayProperties will be returned -func (o *NatGatewayPut) GetProperties() *NatGatewayProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayPut) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayPut) GetPropertiesOk() (*NatGatewayProperties, bool) { +func (o *NatGatewayPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NatGatewayPut) SetProperties(v NatGatewayProperties) { +// SetType sets field value +func (o *NatGatewayPut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NatGatewayPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGatewayPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *NatGatewayPut) HasProperties() bool { func (o NatGatewayPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule.go index 42d20aac8918..4693555cafa7 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule.go @@ -16,14 +16,14 @@ import ( // NatGatewayRule struct for NatGatewayRule type NatGatewayRule struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NatGatewayRuleProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNatGatewayRule instantiates a new NatGatewayRule object @@ -46,190 +46,190 @@ func NewNatGatewayRuleWithDefaults() *NatGatewayRule { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRule) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRule) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRule) GetIdOk() (*string, bool) { +func (o *NatGatewayRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NatGatewayRule) SetId(v string) { +// SetHref sets field value +func (o *NatGatewayRule) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGatewayRule) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NatGatewayRule) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NatGatewayRule) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRule) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRule) GetTypeOk() (*Type, bool) { +func (o *NatGatewayRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NatGatewayRule) SetType(v Type) { +// SetId sets field value +func (o *NatGatewayRule) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGatewayRule) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGatewayRule) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRule) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRule) GetHrefOk() (*string, bool) { +func (o *NatGatewayRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *NatGatewayRule) SetHref(v string) { +// SetMetadata sets field value +func (o *NatGatewayRule) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *NatGatewayRule) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *NatGatewayRule) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *NatGatewayRule) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRule) GetProperties() *NatGatewayRuleProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *NatGatewayRule) GetPropertiesOk() (*NatGatewayRuleProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *NatGatewayRule) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *NatGatewayRule) SetProperties(v NatGatewayRuleProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *NatGatewayRule) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NatGatewayRule) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NatGatewayRuleProperties will be returned -func (o *NatGatewayRule) GetProperties() *NatGatewayRuleProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRule) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRule) GetPropertiesOk() (*NatGatewayRuleProperties, bool) { +func (o *NatGatewayRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NatGatewayRule) SetProperties(v NatGatewayRuleProperties) { +// SetType sets field value +func (o *NatGatewayRule) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NatGatewayRule) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGatewayRule) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *NatGatewayRule) HasProperties() bool { func (o NatGatewayRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_properties.go index 8b3da441e6c3..32330acee594 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_properties.go @@ -18,29 +18,29 @@ import ( type NatGatewayRuleProperties struct { // The name of the NAT Gateway rule. Name *string `json:"name"` - // Type of the NAT Gateway rule. - Type *NatGatewayRuleType `json:"type,omitempty"` // Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set. Protocol *NatGatewayRuleProtocol `json:"protocol,omitempty"` - // Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address. - SourceSubnet *string `json:"sourceSubnet"` // Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource PublicIp *string `json:"publicIp"` - // Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address. - TargetSubnet *string `json:"targetSubnet,omitempty"` + // Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address. + SourceSubnet *string `json:"sourceSubnet"` TargetPortRange *TargetPortRange `json:"targetPortRange,omitempty"` + // Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address. + TargetSubnet *string `json:"targetSubnet,omitempty"` + // Type of the NAT Gateway rule. + Type *NatGatewayRuleType `json:"type,omitempty"` } // NewNatGatewayRuleProperties instantiates a new NatGatewayRuleProperties 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 NewNatGatewayRuleProperties(name string, sourceSubnet string, publicIp string) *NatGatewayRuleProperties { +func NewNatGatewayRuleProperties(name string, publicIp string, sourceSubnet string) *NatGatewayRuleProperties { this := NatGatewayRuleProperties{} this.Name = &name - this.SourceSubnet = &sourceSubnet this.PublicIp = &publicIp + this.SourceSubnet = &sourceSubnet return &this } @@ -54,7 +54,7 @@ func NewNatGatewayRulePropertiesWithDefaults() *NatGatewayRuleProperties { } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetName() *string { if o == nil { return nil @@ -91,76 +91,76 @@ func (o *NatGatewayRuleProperties) HasName() bool { return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for NatGatewayRuleType will be returned -func (o *NatGatewayRuleProperties) GetType() *NatGatewayRuleType { +// GetProtocol returns the Protocol field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRuleProperties) GetProtocol() *NatGatewayRuleProtocol { if o == nil { return nil } - return o.Type + return o.Protocol } -// GetTypeOk returns a tuple with the Type field value +// GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRuleProperties) GetTypeOk() (*NatGatewayRuleType, bool) { +func (o *NatGatewayRuleProperties) GetProtocolOk() (*NatGatewayRuleProtocol, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Protocol, true } -// SetType sets field value -func (o *NatGatewayRuleProperties) SetType(v NatGatewayRuleType) { +// SetProtocol sets field value +func (o *NatGatewayRuleProperties) SetProtocol(v NatGatewayRuleProtocol) { - o.Type = &v + o.Protocol = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGatewayRuleProperties) HasType() bool { - if o != nil && o.Type != nil { +// HasProtocol returns a boolean if a field has been set. +func (o *NatGatewayRuleProperties) HasProtocol() bool { + if o != nil && o.Protocol != nil { return true } return false } -// GetProtocol returns the Protocol field value -// If the value is explicit nil, the zero value for NatGatewayRuleProtocol will be returned -func (o *NatGatewayRuleProperties) GetProtocol() *NatGatewayRuleProtocol { +// GetPublicIp returns the PublicIp field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRuleProperties) GetPublicIp() *string { if o == nil { return nil } - return o.Protocol + return o.PublicIp } -// GetProtocolOk returns a tuple with the Protocol field value +// GetPublicIpOk returns a tuple with the PublicIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRuleProperties) GetProtocolOk() (*NatGatewayRuleProtocol, bool) { +func (o *NatGatewayRuleProperties) GetPublicIpOk() (*string, bool) { if o == nil { return nil, false } - return o.Protocol, true + return o.PublicIp, true } -// SetProtocol sets field value -func (o *NatGatewayRuleProperties) SetProtocol(v NatGatewayRuleProtocol) { +// SetPublicIp sets field value +func (o *NatGatewayRuleProperties) SetPublicIp(v string) { - o.Protocol = &v + o.PublicIp = &v } -// HasProtocol returns a boolean if a field has been set. -func (o *NatGatewayRuleProperties) HasProtocol() bool { - if o != nil && o.Protocol != nil { +// HasPublicIp returns a boolean if a field has been set. +func (o *NatGatewayRuleProperties) HasPublicIp() bool { + if o != nil && o.PublicIp != nil { return true } @@ -168,7 +168,7 @@ func (o *NatGatewayRuleProperties) HasProtocol() bool { } // GetSourceSubnet returns the SourceSubnet field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetSourceSubnet() *string { if o == nil { return nil @@ -205,38 +205,38 @@ func (o *NatGatewayRuleProperties) HasSourceSubnet() bool { return false } -// GetPublicIp returns the PublicIp field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRuleProperties) GetPublicIp() *string { +// GetTargetPortRange returns the TargetPortRange field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRuleProperties) GetTargetPortRange() *TargetPortRange { if o == nil { return nil } - return o.PublicIp + return o.TargetPortRange } -// GetPublicIpOk returns a tuple with the PublicIp field value +// GetTargetPortRangeOk returns a tuple with the TargetPortRange field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRuleProperties) GetPublicIpOk() (*string, bool) { +func (o *NatGatewayRuleProperties) GetTargetPortRangeOk() (*TargetPortRange, bool) { if o == nil { return nil, false } - return o.PublicIp, true + return o.TargetPortRange, true } -// SetPublicIp sets field value -func (o *NatGatewayRuleProperties) SetPublicIp(v string) { +// SetTargetPortRange sets field value +func (o *NatGatewayRuleProperties) SetTargetPortRange(v TargetPortRange) { - o.PublicIp = &v + o.TargetPortRange = &v } -// HasPublicIp returns a boolean if a field has been set. -func (o *NatGatewayRuleProperties) HasPublicIp() bool { - if o != nil && o.PublicIp != nil { +// HasTargetPortRange returns a boolean if a field has been set. +func (o *NatGatewayRuleProperties) HasTargetPortRange() bool { + if o != nil && o.TargetPortRange != nil { return true } @@ -244,7 +244,7 @@ func (o *NatGatewayRuleProperties) HasPublicIp() bool { } // GetTargetSubnet returns the TargetSubnet field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetTargetSubnet() *string { if o == nil { return nil @@ -281,38 +281,38 @@ func (o *NatGatewayRuleProperties) HasTargetSubnet() bool { return false } -// GetTargetPortRange returns the TargetPortRange field value -// If the value is explicit nil, the zero value for TargetPortRange will be returned -func (o *NatGatewayRuleProperties) GetTargetPortRange() *TargetPortRange { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRuleProperties) GetType() *NatGatewayRuleType { if o == nil { return nil } - return o.TargetPortRange + return o.Type } -// GetTargetPortRangeOk returns a tuple with the TargetPortRange field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRuleProperties) GetTargetPortRangeOk() (*TargetPortRange, bool) { +func (o *NatGatewayRuleProperties) GetTypeOk() (*NatGatewayRuleType, bool) { if o == nil { return nil, false } - return o.TargetPortRange, true + return o.Type, true } -// SetTargetPortRange sets field value -func (o *NatGatewayRuleProperties) SetTargetPortRange(v TargetPortRange) { +// SetType sets field value +func (o *NatGatewayRuleProperties) SetType(v NatGatewayRuleType) { - o.TargetPortRange = &v + o.Type = &v } -// HasTargetPortRange returns a boolean if a field has been set. -func (o *NatGatewayRuleProperties) HasTargetPortRange() bool { - if o != nil && o.TargetPortRange != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGatewayRuleProperties) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -324,24 +324,31 @@ func (o NatGatewayRuleProperties) MarshalJSON() ([]byte, error) { if o.Name != nil { toSerialize["name"] = o.Name } - if o.Type != nil { - toSerialize["type"] = o.Type - } + if o.Protocol != nil { toSerialize["protocol"] = o.Protocol } + + if o.PublicIp != nil { + toSerialize["publicIp"] = o.PublicIp + } + if o.SourceSubnet != nil { toSerialize["sourceSubnet"] = o.SourceSubnet } - if o.PublicIp != nil { - toSerialize["publicIp"] = o.PublicIp + + if o.TargetPortRange != nil { + toSerialize["targetPortRange"] = o.TargetPortRange } + if o.TargetSubnet != nil { toSerialize["targetSubnet"] = o.TargetSubnet } - if o.TargetPortRange != nil { - toSerialize["targetPortRange"] = o.TargetPortRange + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_put.go index 2f709351b0f7..e0f92b4099e5 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rule_put.go @@ -16,13 +16,13 @@ import ( // NatGatewayRulePut struct for NatGatewayRulePut type NatGatewayRulePut struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *NatGatewayRuleProperties `json:"properties"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *NatGatewayRuleProperties `json:"properties"` } // NewNatGatewayRulePut instantiates a new NatGatewayRulePut object @@ -45,152 +45,152 @@ func NewNatGatewayRulePutWithDefaults() *NatGatewayRulePut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRulePut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRulePut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRulePut) GetIdOk() (*string, bool) { +func (o *NatGatewayRulePut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NatGatewayRulePut) SetId(v string) { +// SetHref sets field value +func (o *NatGatewayRulePut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGatewayRulePut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NatGatewayRulePut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NatGatewayRulePut) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRulePut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRulePut) GetTypeOk() (*Type, bool) { +func (o *NatGatewayRulePut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NatGatewayRulePut) SetType(v Type) { +// SetId sets field value +func (o *NatGatewayRulePut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGatewayRulePut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGatewayRulePut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRulePut) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRulePut) GetProperties() *NatGatewayRuleProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRulePut) GetHrefOk() (*string, bool) { +func (o *NatGatewayRulePut) GetPropertiesOk() (*NatGatewayRuleProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *NatGatewayRulePut) SetHref(v string) { +// SetProperties sets field value +func (o *NatGatewayRulePut) SetProperties(v NatGatewayRuleProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *NatGatewayRulePut) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NatGatewayRulePut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NatGatewayRuleProperties will be returned -func (o *NatGatewayRulePut) GetProperties() *NatGatewayRuleProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRulePut) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRulePut) GetPropertiesOk() (*NatGatewayRuleProperties, bool) { +func (o *NatGatewayRulePut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NatGatewayRulePut) SetProperties(v NatGatewayRuleProperties) { +// SetType sets field value +func (o *NatGatewayRulePut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NatGatewayRulePut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGatewayRulePut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *NatGatewayRulePut) HasProperties() bool { func (o NatGatewayRulePut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rules.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rules.go index 780bef1f9d85..9d3d41353312 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rules.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateway_rules.go @@ -16,14 +16,14 @@ import ( // NatGatewayRules struct for NatGatewayRules type NatGatewayRules struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]NatGatewayRule `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNatGatewayRules instantiates a new NatGatewayRules object @@ -44,152 +44,152 @@ func NewNatGatewayRulesWithDefaults() *NatGatewayRules { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRules) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRules) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRules) GetIdOk() (*string, bool) { +func (o *NatGatewayRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NatGatewayRules) SetId(v string) { +// SetHref sets field value +func (o *NatGatewayRules) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGatewayRules) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NatGatewayRules) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NatGatewayRules) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRules) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRules) GetTypeOk() (*Type, bool) { +func (o *NatGatewayRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NatGatewayRules) SetType(v Type) { +// SetId sets field value +func (o *NatGatewayRules) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGatewayRules) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGatewayRules) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGatewayRules) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRules) GetItems() *[]NatGatewayRule { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRules) GetHrefOk() (*string, bool) { +func (o *NatGatewayRules) GetItemsOk() (*[]NatGatewayRule, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *NatGatewayRules) SetHref(v string) { +// SetItems sets field value +func (o *NatGatewayRules) SetItems(v []NatGatewayRule) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *NatGatewayRules) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *NatGatewayRules) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []NatGatewayRule will be returned -func (o *NatGatewayRules) GetItems() *[]NatGatewayRule { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGatewayRules) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGatewayRules) GetItemsOk() (*[]NatGatewayRule, bool) { +func (o *NatGatewayRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *NatGatewayRules) SetItems(v []NatGatewayRule) { +// SetType sets field value +func (o *NatGatewayRules) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *NatGatewayRules) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGatewayRules) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *NatGatewayRules) HasItems() bool { func (o NatGatewayRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateways.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateways.go index ea80671fe875..2139508ccc19 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateways.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nat_gateways.go @@ -16,19 +16,19 @@ import ( // NatGateways struct for NatGateways type NatGateways struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]NatGateway `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNatGateways instantiates a new NatGateways object @@ -49,114 +49,114 @@ func NewNatGatewaysWithDefaults() *NatGateways { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGateways) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *NatGateways) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateways) GetIdOk() (*string, bool) { +func (o *NatGateways) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *NatGateways) SetId(v string) { +// SetLinks sets field value +func (o *NatGateways) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *NatGateways) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *NatGateways) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NatGateways) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NatGateways) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateways) GetTypeOk() (*Type, bool) { +func (o *NatGateways) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *NatGateways) SetType(v Type) { +// SetHref sets field value +func (o *NatGateways) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *NatGateways) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *NatGateways) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NatGateways) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NatGateways) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateways) GetHrefOk() (*string, bool) { +func (o *NatGateways) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *NatGateways) SetHref(v string) { +// SetId sets field value +func (o *NatGateways) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *NatGateways) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *NatGateways) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *NatGateways) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []NatGateway will be returned +// If the value is explicit nil, nil is returned func (o *NatGateways) GetItems() *[]NatGateway { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *NatGateways) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *NatGateways) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *NatGateways) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateways) GetOffsetOk() (*float32, bool) { +func (o *NatGateways) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *NatGateways) SetOffset(v float32) { +// SetLimit sets field value +func (o *NatGateways) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *NatGateways) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *NatGateways) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *NatGateways) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *NatGateways) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateways) GetLimitOk() (*float32, bool) { +func (o *NatGateways) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *NatGateways) SetLimit(v float32) { +// SetOffset sets field value +func (o *NatGateways) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *NatGateways) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *NatGateways) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *NatGateways) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NatGateways) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NatGateways) GetLinksOk() (*PaginationLinks, bool) { +func (o *NatGateways) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *NatGateways) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *NatGateways) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *NatGateways) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *NatGateways) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *NatGateways) HasLinks() bool { func (o NatGateways) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer.go index 265e075faa27..efaed067d8e2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer.go @@ -16,15 +16,15 @@ import ( // NetworkLoadBalancer struct for NetworkLoadBalancer type NetworkLoadBalancer struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *NetworkLoadBalancerEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NetworkLoadBalancerProperties `json:"properties"` - Entities *NetworkLoadBalancerEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNetworkLoadBalancer instantiates a new NetworkLoadBalancer object @@ -47,114 +47,114 @@ func NewNetworkLoadBalancerWithDefaults() *NetworkLoadBalancer { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancer) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancer) GetEntities() *NetworkLoadBalancerEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancer) GetIdOk() (*string, bool) { +func (o *NetworkLoadBalancer) GetEntitiesOk() (*NetworkLoadBalancerEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *NetworkLoadBalancer) SetId(v string) { +// SetEntities sets field value +func (o *NetworkLoadBalancer) SetEntities(v NetworkLoadBalancerEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *NetworkLoadBalancer) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *NetworkLoadBalancer) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NetworkLoadBalancer) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancer) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancer) GetTypeOk() (*Type, bool) { +func (o *NetworkLoadBalancer) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *NetworkLoadBalancer) SetType(v Type) { +// SetHref sets field value +func (o *NetworkLoadBalancer) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *NetworkLoadBalancer) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *NetworkLoadBalancer) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancer) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancer) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancer) GetHrefOk() (*string, bool) { +func (o *NetworkLoadBalancer) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *NetworkLoadBalancer) SetHref(v string) { +// SetId sets field value +func (o *NetworkLoadBalancer) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *NetworkLoadBalancer) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *NetworkLoadBalancer) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *NetworkLoadBalancer) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *NetworkLoadBalancer) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerProperties will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetProperties() *NetworkLoadBalancerProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *NetworkLoadBalancer) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerEntities will be returned -func (o *NetworkLoadBalancer) GetEntities() *NetworkLoadBalancerEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancer) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancer) GetEntitiesOk() (*NetworkLoadBalancerEntities, bool) { +func (o *NetworkLoadBalancer) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *NetworkLoadBalancer) SetEntities(v NetworkLoadBalancerEntities) { +// SetType sets field value +func (o *NetworkLoadBalancer) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *NetworkLoadBalancer) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *NetworkLoadBalancer) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *NetworkLoadBalancer) HasEntities() bool { func (o NetworkLoadBalancer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_entities.go index 85dd3bbd6bed..cdd74071c335 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_entities.go @@ -39,7 +39,7 @@ func NewNetworkLoadBalancerEntitiesWithDefaults() *NetworkLoadBalancerEntities { } // GetFlowlogs returns the Flowlogs field value -// If the value is explicit nil, the zero value for FlowLogs will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerEntities) GetFlowlogs() *FlowLogs { if o == nil { return nil @@ -77,7 +77,7 @@ func (o *NetworkLoadBalancerEntities) HasFlowlogs() bool { } // GetForwardingrules returns the Forwardingrules field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerForwardingRules will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerEntities) GetForwardingrules() *NetworkLoadBalancerForwardingRules { if o == nil { return nil @@ -119,9 +119,11 @@ func (o NetworkLoadBalancerEntities) MarshalJSON() ([]byte, error) { if o.Flowlogs != nil { toSerialize["flowlogs"] = o.Flowlogs } + if o.Forwardingrules != nil { toSerialize["forwardingrules"] = o.Forwardingrules } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule.go index 8f054c8855a3..d5018315f1af 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule.go @@ -16,14 +16,14 @@ import ( // NetworkLoadBalancerForwardingRule struct for NetworkLoadBalancerForwardingRule type NetworkLoadBalancerForwardingRule struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NetworkLoadBalancerForwardingRuleProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNetworkLoadBalancerForwardingRule instantiates a new NetworkLoadBalancerForwardingRule object @@ -46,190 +46,190 @@ func NewNetworkLoadBalancerForwardingRuleWithDefaults() *NetworkLoadBalancerForw return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRule) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRule) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRule) GetIdOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NetworkLoadBalancerForwardingRule) SetId(v string) { +// SetHref sets field value +func (o *NetworkLoadBalancerForwardingRule) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRule) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRule) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NetworkLoadBalancerForwardingRule) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRule) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { +func (o *NetworkLoadBalancerForwardingRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NetworkLoadBalancerForwardingRule) SetType(v Type) { +// SetId sets field value +func (o *NetworkLoadBalancerForwardingRule) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRule) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRule) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRule) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *NetworkLoadBalancerForwardingRule) SetHref(v string) { +// SetMetadata sets field value +func (o *NetworkLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRule) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRule) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *NetworkLoadBalancerForwardingRule) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRule) GetProperties() *NetworkLoadBalancerForwardingRuleProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *NetworkLoadBalancerForwardingRule) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *NetworkLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *NetworkLoadBalancerForwardingRule) SetProperties(v NetworkLoadBalancerForwardingRuleProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRule) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRule) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerForwardingRuleProperties will be returned -func (o *NetworkLoadBalancerForwardingRule) GetProperties() *NetworkLoadBalancerForwardingRuleProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRule) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRule) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool) { +func (o *NetworkLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NetworkLoadBalancerForwardingRule) SetProperties(v NetworkLoadBalancerForwardingRuleProperties) { +// SetType sets field value +func (o *NetworkLoadBalancerForwardingRule) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRule) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRule) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *NetworkLoadBalancerForwardingRule) HasProperties() bool { func (o NetworkLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_health_check.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_health_check.go index 3fa9df4f4b42..cd16a13efc7e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_health_check.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_health_check.go @@ -20,10 +20,10 @@ type NetworkLoadBalancerForwardingRuleHealthCheck struct { ClientTimeout *int32 `json:"clientTimeout,omitempty"` // The maximum time in milliseconds to wait for a connection attempt to a target to succeed; default is 5000 (five seconds). ConnectTimeout *int32 `json:"connectTimeout,omitempty"` - // The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). - TargetTimeout *int32 `json:"targetTimeout,omitempty"` // The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535 and default is three reconnection attempts. Retries *int32 `json:"retries,omitempty"` + // The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). + TargetTimeout *int32 `json:"targetTimeout,omitempty"` } // NewNetworkLoadBalancerForwardingRuleHealthCheck instantiates a new NetworkLoadBalancerForwardingRuleHealthCheck object @@ -45,7 +45,7 @@ func NewNetworkLoadBalancerForwardingRuleHealthCheckWithDefaults() *NetworkLoadB } // GetClientTimeout returns the ClientTimeout field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetClientTimeout() *int32 { if o == nil { return nil @@ -83,7 +83,7 @@ func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasClientTimeout() bool { } // GetConnectTimeout returns the ConnectTimeout field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetConnectTimeout() *int32 { if o == nil { return nil @@ -120,76 +120,76 @@ func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasConnectTimeout() bool return false } -// GetTargetTimeout returns the TargetTimeout field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeout() *int32 { +// GetRetries returns the Retries field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetries() *int32 { if o == nil { return nil } - return o.TargetTimeout + return o.Retries } -// GetTargetTimeoutOk returns a tuple with the TargetTimeout field value +// GetRetriesOk returns a tuple with the Retries field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeoutOk() (*int32, bool) { +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetriesOk() (*int32, bool) { if o == nil { return nil, false } - return o.TargetTimeout, true + return o.Retries, true } -// SetTargetTimeout sets field value -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetTargetTimeout(v int32) { +// SetRetries sets field value +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetRetries(v int32) { - o.TargetTimeout = &v + o.Retries = &v } -// HasTargetTimeout returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasTargetTimeout() bool { - if o != nil && o.TargetTimeout != nil { +// HasRetries returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasRetries() bool { + if o != nil && o.Retries != nil { return true } return false } -// GetRetries returns the Retries field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetries() *int32 { +// GetTargetTimeout returns the TargetTimeout field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeout() *int32 { if o == nil { return nil } - return o.Retries + return o.TargetTimeout } -// GetRetriesOk returns a tuple with the Retries field value +// GetTargetTimeoutOk returns a tuple with the TargetTimeout field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetriesOk() (*int32, bool) { +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeoutOk() (*int32, bool) { if o == nil { return nil, false } - return o.Retries, true + return o.TargetTimeout, true } -// SetRetries sets field value -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetRetries(v int32) { +// SetTargetTimeout sets field value +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetTargetTimeout(v int32) { - o.Retries = &v + o.TargetTimeout = &v } -// HasRetries returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasRetries() bool { - if o != nil && o.Retries != nil { +// HasTargetTimeout returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasTargetTimeout() bool { + if o != nil && o.TargetTimeout != nil { return true } @@ -201,15 +201,19 @@ func (o NetworkLoadBalancerForwardingRuleHealthCheck) MarshalJSON() ([]byte, err if o.ClientTimeout != nil { toSerialize["clientTimeout"] = o.ClientTimeout } + if o.ConnectTimeout != nil { toSerialize["connectTimeout"] = o.ConnectTimeout } - if o.TargetTimeout != nil { - toSerialize["targetTimeout"] = o.TargetTimeout - } + if o.Retries != nil { toSerialize["retries"] = o.Retries } + + if o.TargetTimeout != nil { + toSerialize["targetTimeout"] = o.TargetTimeout + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_properties.go index d8ba812ab77f..c3131afa171b 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_properties.go @@ -16,17 +16,17 @@ import ( // NetworkLoadBalancerForwardingRuleProperties struct for NetworkLoadBalancerForwardingRuleProperties type NetworkLoadBalancerForwardingRuleProperties struct { + // Balancing algorithm + Algorithm *string `json:"algorithm"` + HealthCheck *NetworkLoadBalancerForwardingRuleHealthCheck `json:"healthCheck,omitempty"` + // Listening (inbound) IP. + ListenerIp *string `json:"listenerIp"` + // Listening (inbound) port number; valid range is 1 to 65535. + ListenerPort *int32 `json:"listenerPort"` // The name of the Network Load Balancer forwarding rule. Name *string `json:"name"` - // Balancing algorithm - Algorithm *string `json:"algorithm"` // Balancing protocol Protocol *string `json:"protocol"` - // Listening (inbound) IP - ListenerIp *string `json:"listenerIp"` - // Listening (inbound) port number; valid range is 1 to 65535. - ListenerPort *int32 `json:"listenerPort"` - HealthCheck *NetworkLoadBalancerForwardingRuleHealthCheck `json:"healthCheck,omitempty"` // Array of items in the collection. Targets *[]NetworkLoadBalancerForwardingRuleTarget `json:"targets"` } @@ -35,14 +35,14 @@ type NetworkLoadBalancerForwardingRuleProperties struct { // 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 NewNetworkLoadBalancerForwardingRuleProperties(name string, algorithm string, protocol string, listenerIp string, listenerPort int32, targets []NetworkLoadBalancerForwardingRuleTarget) *NetworkLoadBalancerForwardingRuleProperties { +func NewNetworkLoadBalancerForwardingRuleProperties(algorithm string, listenerIp string, listenerPort int32, name string, protocol string, targets []NetworkLoadBalancerForwardingRuleTarget) *NetworkLoadBalancerForwardingRuleProperties { this := NetworkLoadBalancerForwardingRuleProperties{} - this.Name = &name this.Algorithm = &algorithm - this.Protocol = &protocol this.ListenerIp = &listenerIp this.ListenerPort = &listenerPort + this.Name = &name + this.Protocol = &protocol this.Targets = &targets return &this @@ -56,46 +56,8 @@ func NewNetworkLoadBalancerForwardingRulePropertiesWithDefaults() *NetworkLoadBa return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRuleProperties) GetName() *string { - if o == nil { - return nil - } - - return o.Name - -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - - return o.Name, true -} - -// SetName sets field value -func (o *NetworkLoadBalancerForwardingRuleProperties) SetName(v string) { - - o.Name = &v - -} - -// HasName returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRuleProperties) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - // GetAlgorithm returns the Algorithm field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetAlgorithm() *string { if o == nil { return nil @@ -132,38 +94,38 @@ func (o *NetworkLoadBalancerForwardingRuleProperties) HasAlgorithm() bool { return false } -// GetProtocol returns the Protocol field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocol() *string { +// GetHealthCheck returns the HealthCheck field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheck() *NetworkLoadBalancerForwardingRuleHealthCheck { if o == nil { return nil } - return o.Protocol + return o.HealthCheck } -// GetProtocolOk returns a tuple with the Protocol field value +// GetHealthCheckOk returns a tuple with the HealthCheck field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleHealthCheck, bool) { if o == nil { return nil, false } - return o.Protocol, true + return o.HealthCheck, true } -// SetProtocol sets field value -func (o *NetworkLoadBalancerForwardingRuleProperties) SetProtocol(v string) { +// SetHealthCheck sets field value +func (o *NetworkLoadBalancerForwardingRuleProperties) SetHealthCheck(v NetworkLoadBalancerForwardingRuleHealthCheck) { - o.Protocol = &v + o.HealthCheck = &v } -// HasProtocol returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRuleProperties) HasProtocol() bool { - if o != nil && o.Protocol != nil { +// HasHealthCheck returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleProperties) HasHealthCheck() bool { + if o != nil && o.HealthCheck != nil { return true } @@ -171,7 +133,7 @@ func (o *NetworkLoadBalancerForwardingRuleProperties) HasProtocol() bool { } // GetListenerIp returns the ListenerIp field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerIp() *string { if o == nil { return nil @@ -209,7 +171,7 @@ func (o *NetworkLoadBalancerForwardingRuleProperties) HasListenerIp() bool { } // GetListenerPort returns the ListenerPort field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerPort() *int32 { if o == nil { return nil @@ -246,38 +208,76 @@ func (o *NetworkLoadBalancerForwardingRuleProperties) HasListenerPort() bool { return false } -// GetHealthCheck returns the HealthCheck field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerForwardingRuleHealthCheck will be returned -func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheck() *NetworkLoadBalancerForwardingRuleHealthCheck { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleProperties) GetName() *string { if o == nil { return nil } - return o.HealthCheck + return o.Name } -// GetHealthCheckOk returns a tuple with the HealthCheck field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleHealthCheck, bool) { +func (o *NetworkLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.HealthCheck, true + return o.Name, true } -// SetHealthCheck sets field value -func (o *NetworkLoadBalancerForwardingRuleProperties) SetHealthCheck(v NetworkLoadBalancerForwardingRuleHealthCheck) { +// SetName sets field value +func (o *NetworkLoadBalancerForwardingRuleProperties) SetName(v string) { - o.HealthCheck = &v + o.Name = &v } -// HasHealthCheck returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRuleProperties) HasHealthCheck() bool { - if o != nil && o.HealthCheck != nil { +// HasName returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleProperties) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// GetProtocol returns the Protocol field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocol() *string { + if o == nil { + return nil + } + + return o.Protocol + +} + +// GetProtocolOk returns a tuple with the Protocol field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Protocol, true +} + +// SetProtocol sets field value +func (o *NetworkLoadBalancerForwardingRuleProperties) SetProtocol(v string) { + + o.Protocol = &v + +} + +// HasProtocol returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleProperties) HasProtocol() bool { + if o != nil && o.Protocol != nil { return true } @@ -285,7 +285,7 @@ func (o *NetworkLoadBalancerForwardingRuleProperties) HasHealthCheck() bool { } // GetTargets returns the Targets field value -// If the value is explicit nil, the zero value for []NetworkLoadBalancerForwardingRuleTarget will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetTargets() *[]NetworkLoadBalancerForwardingRuleTarget { if o == nil { return nil @@ -324,27 +324,34 @@ func (o *NetworkLoadBalancerForwardingRuleProperties) HasTargets() bool { func (o NetworkLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } if o.Algorithm != nil { toSerialize["algorithm"] = o.Algorithm } - if o.Protocol != nil { - toSerialize["protocol"] = o.Protocol + + if o.HealthCheck != nil { + toSerialize["healthCheck"] = o.HealthCheck } + if o.ListenerIp != nil { toSerialize["listenerIp"] = o.ListenerIp } + if o.ListenerPort != nil { toSerialize["listenerPort"] = o.ListenerPort } - if o.HealthCheck != nil { - toSerialize["healthCheck"] = o.HealthCheck + + if o.Name != nil { + toSerialize["name"] = o.Name } + + if o.Protocol != nil { + toSerialize["protocol"] = o.Protocol + } + if o.Targets != nil { toSerialize["targets"] = o.Targets } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_put.go index ee8f95aeae74..16c6e39bb7c2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_put.go @@ -16,13 +16,13 @@ import ( // NetworkLoadBalancerForwardingRulePut struct for NetworkLoadBalancerForwardingRulePut type NetworkLoadBalancerForwardingRulePut struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *NetworkLoadBalancerForwardingRuleProperties `json:"properties"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *NetworkLoadBalancerForwardingRuleProperties `json:"properties"` } // NewNetworkLoadBalancerForwardingRulePut instantiates a new NetworkLoadBalancerForwardingRulePut object @@ -45,152 +45,152 @@ func NewNetworkLoadBalancerForwardingRulePutWithDefaults() *NetworkLoadBalancerF return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRulePut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NetworkLoadBalancerForwardingRulePut) SetId(v string) { +// SetHref sets field value +func (o *NetworkLoadBalancerForwardingRulePut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRulePut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRulePut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRulePut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { +func (o *NetworkLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NetworkLoadBalancerForwardingRulePut) SetType(v Type) { +// SetId sets field value +func (o *NetworkLoadBalancerForwardingRulePut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRulePut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRulePut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRulePut) GetProperties() *NetworkLoadBalancerForwardingRuleProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRulePut) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *NetworkLoadBalancerForwardingRulePut) SetHref(v string) { +// SetProperties sets field value +func (o *NetworkLoadBalancerForwardingRulePut) SetProperties(v NetworkLoadBalancerForwardingRuleProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRulePut) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRulePut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerForwardingRuleProperties will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetProperties() *NetworkLoadBalancerForwardingRuleProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRulePut) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRulePut) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool) { +func (o *NetworkLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NetworkLoadBalancerForwardingRulePut) SetProperties(v NetworkLoadBalancerForwardingRuleProperties) { +// SetType sets field value +func (o *NetworkLoadBalancerForwardingRulePut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRulePut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRulePut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *NetworkLoadBalancerForwardingRulePut) HasProperties() bool { func (o NetworkLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target.go index 502d5bda87b4..f02e7608c012 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target.go @@ -16,13 +16,15 @@ import ( // NetworkLoadBalancerForwardingRuleTarget struct for NetworkLoadBalancerForwardingRuleTarget type NetworkLoadBalancerForwardingRuleTarget struct { + HealthCheck *NetworkLoadBalancerForwardingRuleTargetHealthCheck `json:"healthCheck,omitempty"` // The IP of the balanced target VM. Ip *string `json:"ip"` // The port of the balanced target service; valid range is 1 to 65535. Port *int32 `json:"port"` // Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1. Targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best to assign weights in the middle of the range to leave room for later adjustments. - Weight *int32 `json:"weight"` - HealthCheck *NetworkLoadBalancerForwardingRuleTargetHealthCheck `json:"healthCheck,omitempty"` + Weight *int32 `json:"weight"` + // ProxyProtocol is used to set the proxy protocol version. + ProxyProtocol *string `json:"proxyProtocol,omitempty"` } // NewNetworkLoadBalancerForwardingRuleTarget instantiates a new NetworkLoadBalancerForwardingRuleTarget object @@ -35,6 +37,8 @@ func NewNetworkLoadBalancerForwardingRuleTarget(ip string, port int32, weight in this.Ip = &ip this.Port = &port this.Weight = &weight + var proxyProtocol string = "none" + this.ProxyProtocol = &proxyProtocol return &this } @@ -44,11 +48,51 @@ func NewNetworkLoadBalancerForwardingRuleTarget(ip string, port int32, weight in // but it doesn't guarantee that properties required by API are set func NewNetworkLoadBalancerForwardingRuleTargetWithDefaults() *NetworkLoadBalancerForwardingRuleTarget { this := NetworkLoadBalancerForwardingRuleTarget{} + var proxyProtocol string = "none" + this.ProxyProtocol = &proxyProtocol return &this } +// GetHealthCheck returns the HealthCheck field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheck() *NetworkLoadBalancerForwardingRuleTargetHealthCheck { + if o == nil { + return nil + } + + return o.HealthCheck + +} + +// GetHealthCheckOk returns a tuple with the HealthCheck field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleTargetHealthCheck, bool) { + if o == nil { + return nil, false + } + + return o.HealthCheck, true +} + +// SetHealthCheck sets field value +func (o *NetworkLoadBalancerForwardingRuleTarget) SetHealthCheck(v NetworkLoadBalancerForwardingRuleTargetHealthCheck) { + + o.HealthCheck = &v + +} + +// HasHealthCheck returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleTarget) HasHealthCheck() bool { + if o != nil && o.HealthCheck != nil { + return true + } + + return false +} + // GetIp returns the Ip field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetIp() *string { if o == nil { return nil @@ -86,7 +130,7 @@ func (o *NetworkLoadBalancerForwardingRuleTarget) HasIp() bool { } // GetPort returns the Port field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetPort() *int32 { if o == nil { return nil @@ -124,7 +168,7 @@ func (o *NetworkLoadBalancerForwardingRuleTarget) HasPort() bool { } // GetWeight returns the Weight field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetWeight() *int32 { if o == nil { return nil @@ -161,38 +205,38 @@ func (o *NetworkLoadBalancerForwardingRuleTarget) HasWeight() bool { return false } -// GetHealthCheck returns the HealthCheck field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerForwardingRuleTargetHealthCheck will be returned -func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheck() *NetworkLoadBalancerForwardingRuleTargetHealthCheck { +// GetProxyProtocol returns the ProxyProtocol field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRuleTarget) GetProxyProtocol() *string { if o == nil { return nil } - return o.HealthCheck + return o.ProxyProtocol } -// GetHealthCheckOk returns a tuple with the HealthCheck field value +// GetProxyProtocolOk returns a tuple with the ProxyProtocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleTargetHealthCheck, bool) { +func (o *NetworkLoadBalancerForwardingRuleTarget) GetProxyProtocolOk() (*string, bool) { if o == nil { return nil, false } - return o.HealthCheck, true + return o.ProxyProtocol, true } -// SetHealthCheck sets field value -func (o *NetworkLoadBalancerForwardingRuleTarget) SetHealthCheck(v NetworkLoadBalancerForwardingRuleTargetHealthCheck) { +// SetProxyProtocol sets field value +func (o *NetworkLoadBalancerForwardingRuleTarget) SetProxyProtocol(v string) { - o.HealthCheck = &v + o.ProxyProtocol = &v } -// HasHealthCheck returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRuleTarget) HasHealthCheck() bool { - if o != nil && o.HealthCheck != nil { +// HasProxyProtocol returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRuleTarget) HasProxyProtocol() bool { + if o != nil && o.ProxyProtocol != nil { return true } @@ -201,18 +245,26 @@ func (o *NetworkLoadBalancerForwardingRuleTarget) HasHealthCheck() bool { func (o NetworkLoadBalancerForwardingRuleTarget) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.HealthCheck != nil { + toSerialize["healthCheck"] = o.HealthCheck + } + if o.Ip != nil { toSerialize["ip"] = o.Ip } + if o.Port != nil { toSerialize["port"] = o.Port } + if o.Weight != nil { toSerialize["weight"] = o.Weight } - if o.HealthCheck != nil { - toSerialize["healthCheck"] = o.HealthCheck + + if o.ProxyProtocol != nil { + toSerialize["proxyProtocol"] = o.ProxyProtocol } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target_health_check.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target_health_check.go index 8fac2b6dbd0d..8d7e994a32c5 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target_health_check.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rule_target_health_check.go @@ -43,7 +43,7 @@ func NewNetworkLoadBalancerForwardingRuleTargetHealthCheckWithDefaults() *Networ } // GetCheck returns the Check field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheck() *bool { if o == nil { return nil @@ -81,7 +81,7 @@ func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasCheck() bool { } // GetCheckInterval returns the CheckInterval field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckInterval() *int32 { if o == nil { return nil @@ -119,7 +119,7 @@ func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasCheckInterval() } // GetMaintenance returns the Maintenance field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetMaintenance() *bool { if o == nil { return nil @@ -161,12 +161,15 @@ func (o NetworkLoadBalancerForwardingRuleTargetHealthCheck) MarshalJSON() ([]byt if o.Check != nil { toSerialize["check"] = o.Check } + if o.CheckInterval != nil { toSerialize["checkInterval"] = o.CheckInterval } + if o.Maintenance != nil { toSerialize["maintenance"] = o.Maintenance } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rules.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rules.go index a23c77408257..2668d63287ec 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rules.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_forwarding_rules.go @@ -16,19 +16,19 @@ import ( // NetworkLoadBalancerForwardingRules struct for NetworkLoadBalancerForwardingRules type NetworkLoadBalancerForwardingRules struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]NetworkLoadBalancerForwardingRule `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNetworkLoadBalancerForwardingRules instantiates a new NetworkLoadBalancerForwardingRules object @@ -49,114 +49,114 @@ func NewNetworkLoadBalancerForwardingRulesWithDefaults() *NetworkLoadBalancerFor return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRules) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRules) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRules) GetIdOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *NetworkLoadBalancerForwardingRules) SetId(v string) { +// SetLinks sets field value +func (o *NetworkLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRules) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRules) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NetworkLoadBalancerForwardingRules) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRules) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { +func (o *NetworkLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *NetworkLoadBalancerForwardingRules) SetType(v Type) { +// SetHref sets field value +func (o *NetworkLoadBalancerForwardingRules) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRules) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRules) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerForwardingRules) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRules) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { +func (o *NetworkLoadBalancerForwardingRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *NetworkLoadBalancerForwardingRules) SetHref(v string) { +// SetId sets field value +func (o *NetworkLoadBalancerForwardingRules) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRules) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRules) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *NetworkLoadBalancerForwardingRules) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []NetworkLoadBalancerForwardingRule will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetItems() *[]NetworkLoadBalancerForwardingRule { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *NetworkLoadBalancerForwardingRules) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *NetworkLoadBalancerForwardingRules) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRules) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { +func (o *NetworkLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *NetworkLoadBalancerForwardingRules) SetOffset(v float32) { +// SetLimit sets field value +func (o *NetworkLoadBalancerForwardingRules) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRules) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRules) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *NetworkLoadBalancerForwardingRules) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRules) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { +func (o *NetworkLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *NetworkLoadBalancerForwardingRules) SetLimit(v float32) { +// SetOffset sets field value +func (o *NetworkLoadBalancerForwardingRules) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRules) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRules) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *NetworkLoadBalancerForwardingRules) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerForwardingRules) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { +func (o *NetworkLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *NetworkLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *NetworkLoadBalancerForwardingRules) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *NetworkLoadBalancerForwardingRules) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *NetworkLoadBalancerForwardingRules) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *NetworkLoadBalancerForwardingRules) HasLinks() bool { func (o NetworkLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_properties.go index 94170d456e05..114b8b08a159 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_properties.go @@ -16,27 +16,27 @@ import ( // NetworkLoadBalancerProperties struct for NetworkLoadBalancerProperties type NetworkLoadBalancerProperties struct { - // The name of the Network Load Balancer. - Name *string `json:"name"` - // ID of the listening LAN (inbound). - ListenerLan *int32 `json:"listenerLan"` // Collection of the Network Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan must be customer-reserved IPs for public Load Balancers, and private IPs for private Load Balancers. Ips *[]string `json:"ips,omitempty"` - // ID of the balanced private target LAN (outbound). - TargetLan *int32 `json:"targetLan"` // Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. LbPrivateIps *[]string `json:"lbPrivateIps,omitempty"` + // ID of the listening LAN (inbound). + ListenerLan *int32 `json:"listenerLan"` + // The name of the Network Load Balancer. + Name *string `json:"name"` + // ID of the balanced private target LAN (outbound). + TargetLan *int32 `json:"targetLan"` } // NewNetworkLoadBalancerProperties instantiates a new NetworkLoadBalancerProperties 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 NewNetworkLoadBalancerProperties(name string, listenerLan int32, targetLan int32) *NetworkLoadBalancerProperties { +func NewNetworkLoadBalancerProperties(listenerLan int32, name string, targetLan int32) *NetworkLoadBalancerProperties { this := NetworkLoadBalancerProperties{} - this.Name = &name this.ListenerLan = &listenerLan + this.Name = &name this.TargetLan = &targetLan return &this @@ -50,38 +50,76 @@ func NewNetworkLoadBalancerPropertiesWithDefaults() *NetworkLoadBalancerProperti return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerProperties) GetName() *string { +// GetIps returns the Ips field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerProperties) GetIps() *[]string { if o == nil { return nil } - return o.Name + return o.Ips } -// GetNameOk returns a tuple with the Name field value +// GetIpsOk returns a tuple with the Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerProperties) GetNameOk() (*string, bool) { +func (o *NetworkLoadBalancerProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Ips, true } -// SetName sets field value -func (o *NetworkLoadBalancerProperties) SetName(v string) { +// SetIps sets field value +func (o *NetworkLoadBalancerProperties) SetIps(v []string) { - o.Name = &v + o.Ips = &v } -// HasName returns a boolean if a field has been set. -func (o *NetworkLoadBalancerProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasIps returns a boolean if a field has been set. +func (o *NetworkLoadBalancerProperties) HasIps() bool { + if o != nil && o.Ips != nil { + return true + } + + return false +} + +// GetLbPrivateIps returns the LbPrivateIps field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerProperties) GetLbPrivateIps() *[]string { + if o == nil { + return nil + } + + return o.LbPrivateIps + +} + +// GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + + return o.LbPrivateIps, true +} + +// SetLbPrivateIps sets field value +func (o *NetworkLoadBalancerProperties) SetLbPrivateIps(v []string) { + + o.LbPrivateIps = &v + +} + +// HasLbPrivateIps returns a boolean if a field has been set. +func (o *NetworkLoadBalancerProperties) HasLbPrivateIps() bool { + if o != nil && o.LbPrivateIps != nil { return true } @@ -89,7 +127,7 @@ func (o *NetworkLoadBalancerProperties) HasName() bool { } // GetListenerLan returns the ListenerLan field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetListenerLan() *int32 { if o == nil { return nil @@ -126,38 +164,38 @@ func (o *NetworkLoadBalancerProperties) HasListenerLan() bool { return false } -// GetIps returns the Ips field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *NetworkLoadBalancerProperties) GetIps() *[]string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerProperties) GetName() *string { if o == nil { return nil } - return o.Ips + return o.Name } -// GetIpsOk returns a tuple with the Ips field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerProperties) GetIpsOk() (*[]string, bool) { +func (o *NetworkLoadBalancerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Ips, true + return o.Name, true } -// SetIps sets field value -func (o *NetworkLoadBalancerProperties) SetIps(v []string) { +// SetName sets field value +func (o *NetworkLoadBalancerProperties) SetName(v string) { - o.Ips = &v + o.Name = &v } -// HasIps returns a boolean if a field has been set. -func (o *NetworkLoadBalancerProperties) HasIps() bool { - if o != nil && o.Ips != nil { +// HasName returns a boolean if a field has been set. +func (o *NetworkLoadBalancerProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -165,7 +203,7 @@ func (o *NetworkLoadBalancerProperties) HasIps() bool { } // GetTargetLan returns the TargetLan field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetTargetLan() *int32 { if o == nil { return nil @@ -202,61 +240,28 @@ func (o *NetworkLoadBalancerProperties) HasTargetLan() bool { return false } -// GetLbPrivateIps returns the LbPrivateIps field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *NetworkLoadBalancerProperties) GetLbPrivateIps() *[]string { - if o == nil { - return nil +func (o NetworkLoadBalancerProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Ips != nil { + toSerialize["ips"] = o.Ips } - return o.LbPrivateIps - -} - -// GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool) { - if o == nil { - return nil, false + if o.LbPrivateIps != nil { + toSerialize["lbPrivateIps"] = o.LbPrivateIps } - return o.LbPrivateIps, true -} - -// SetLbPrivateIps sets field value -func (o *NetworkLoadBalancerProperties) SetLbPrivateIps(v []string) { - - o.LbPrivateIps = &v - -} - -// HasLbPrivateIps returns a boolean if a field has been set. -func (o *NetworkLoadBalancerProperties) HasLbPrivateIps() bool { - if o != nil && o.LbPrivateIps != nil { - return true + if o.ListenerLan != nil { + toSerialize["listenerLan"] = o.ListenerLan } - return false -} - -func (o NetworkLoadBalancerProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } - if o.ListenerLan != nil { - toSerialize["listenerLan"] = o.ListenerLan - } - if o.Ips != nil { - toSerialize["ips"] = o.Ips - } + if o.TargetLan != nil { toSerialize["targetLan"] = o.TargetLan } - if o.LbPrivateIps != nil { - toSerialize["lbPrivateIps"] = o.LbPrivateIps - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_put.go index 05bde508cbb5..ec4deb54b3ad 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancer_put.go @@ -16,13 +16,13 @@ import ( // NetworkLoadBalancerPut struct for NetworkLoadBalancerPut type NetworkLoadBalancerPut struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *NetworkLoadBalancerProperties `json:"properties"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *NetworkLoadBalancerProperties `json:"properties"` } // NewNetworkLoadBalancerPut instantiates a new NetworkLoadBalancerPut object @@ -45,152 +45,152 @@ func NewNetworkLoadBalancerPutWithDefaults() *NetworkLoadBalancerPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerPut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerPut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerPut) GetIdOk() (*string, bool) { +func (o *NetworkLoadBalancerPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NetworkLoadBalancerPut) SetId(v string) { +// SetHref sets field value +func (o *NetworkLoadBalancerPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NetworkLoadBalancerPut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NetworkLoadBalancerPut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NetworkLoadBalancerPut) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerPut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerPut) GetTypeOk() (*Type, bool) { +func (o *NetworkLoadBalancerPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NetworkLoadBalancerPut) SetType(v Type) { +// SetId sets field value +func (o *NetworkLoadBalancerPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NetworkLoadBalancerPut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NetworkLoadBalancerPut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancerPut) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerPut) GetProperties() *NetworkLoadBalancerProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerPut) GetHrefOk() (*string, bool) { +func (o *NetworkLoadBalancerPut) GetPropertiesOk() (*NetworkLoadBalancerProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *NetworkLoadBalancerPut) SetHref(v string) { +// SetProperties sets field value +func (o *NetworkLoadBalancerPut) SetProperties(v NetworkLoadBalancerProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *NetworkLoadBalancerPut) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NetworkLoadBalancerPut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NetworkLoadBalancerProperties will be returned -func (o *NetworkLoadBalancerPut) GetProperties() *NetworkLoadBalancerProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancerPut) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancerPut) GetPropertiesOk() (*NetworkLoadBalancerProperties, bool) { +func (o *NetworkLoadBalancerPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NetworkLoadBalancerPut) SetProperties(v NetworkLoadBalancerProperties) { +// SetType sets field value +func (o *NetworkLoadBalancerPut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NetworkLoadBalancerPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NetworkLoadBalancerPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *NetworkLoadBalancerPut) HasProperties() bool { func (o NetworkLoadBalancerPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancers.go index 91bbe63e1fb3..b4ccbbc87343 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_network_load_balancers.go @@ -16,19 +16,19 @@ import ( // NetworkLoadBalancers struct for NetworkLoadBalancers type NetworkLoadBalancers struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]NetworkLoadBalancer `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNetworkLoadBalancers instantiates a new NetworkLoadBalancers object @@ -49,114 +49,114 @@ func NewNetworkLoadBalancersWithDefaults() *NetworkLoadBalancers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancers) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancers) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancers) GetIdOk() (*string, bool) { +func (o *NetworkLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *NetworkLoadBalancers) SetId(v string) { +// SetLinks sets field value +func (o *NetworkLoadBalancers) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *NetworkLoadBalancers) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *NetworkLoadBalancers) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NetworkLoadBalancers) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancers) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancers) GetTypeOk() (*Type, bool) { +func (o *NetworkLoadBalancers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *NetworkLoadBalancers) SetType(v Type) { +// SetHref sets field value +func (o *NetworkLoadBalancers) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *NetworkLoadBalancers) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *NetworkLoadBalancers) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NetworkLoadBalancers) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancers) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancers) GetHrefOk() (*string, bool) { +func (o *NetworkLoadBalancers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *NetworkLoadBalancers) SetHref(v string) { +// SetId sets field value +func (o *NetworkLoadBalancers) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *NetworkLoadBalancers) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *NetworkLoadBalancers) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *NetworkLoadBalancers) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []NetworkLoadBalancer will be returned +// If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetItems() *[]NetworkLoadBalancer { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *NetworkLoadBalancers) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *NetworkLoadBalancers) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancers) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancers) GetOffsetOk() (*float32, bool) { +func (o *NetworkLoadBalancers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *NetworkLoadBalancers) SetOffset(v float32) { +// SetLimit sets field value +func (o *NetworkLoadBalancers) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *NetworkLoadBalancers) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *NetworkLoadBalancers) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *NetworkLoadBalancers) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancers) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancers) GetLimitOk() (*float32, bool) { +func (o *NetworkLoadBalancers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *NetworkLoadBalancers) SetLimit(v float32) { +// SetOffset sets field value +func (o *NetworkLoadBalancers) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *NetworkLoadBalancers) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *NetworkLoadBalancers) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *NetworkLoadBalancers) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NetworkLoadBalancers) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NetworkLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { +func (o *NetworkLoadBalancers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *NetworkLoadBalancers) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *NetworkLoadBalancers) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *NetworkLoadBalancers) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *NetworkLoadBalancers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *NetworkLoadBalancers) HasLinks() bool { func (o NetworkLoadBalancers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic.go index 9d8378c6f325..6a9c05537b2e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic.go @@ -16,15 +16,15 @@ import ( // Nic struct for Nic type Nic struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *NicEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NicProperties `json:"properties"` - Entities *NicEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNic instantiates a new Nic object @@ -47,114 +47,114 @@ func NewNicWithDefaults() *Nic { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Nic) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Nic) GetEntities() *NicEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nic) GetIdOk() (*string, bool) { +func (o *Nic) GetEntitiesOk() (*NicEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Nic) SetId(v string) { +// SetEntities sets field value +func (o *Nic) SetEntities(v NicEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Nic) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Nic) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Nic) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Nic) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nic) GetTypeOk() (*Type, bool) { +func (o *Nic) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Nic) SetType(v Type) { +// SetHref sets field value +func (o *Nic) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Nic) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Nic) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Nic) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Nic) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nic) GetHrefOk() (*string, bool) { +func (o *Nic) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Nic) SetHref(v string) { +// SetId sets field value +func (o *Nic) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Nic) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Nic) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *Nic) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *Nic) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *Nic) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NicProperties will be returned +// If the value is explicit nil, nil is returned func (o *Nic) GetProperties() *NicProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *Nic) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for NicEntities will be returned -func (o *Nic) GetEntities() *NicEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Nic) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nic) GetEntitiesOk() (*NicEntities, bool) { +func (o *Nic) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Nic) SetEntities(v NicEntities) { +// SetType sets field value +func (o *Nic) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Nic) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Nic) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *Nic) HasEntities() bool { func (o Nic) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_entities.go index b1a5553a7e83..ab19ab4ac91f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_entities.go @@ -16,8 +16,8 @@ import ( // NicEntities struct for NicEntities type NicEntities struct { - Flowlogs *FlowLogs `json:"flowlogs,omitempty"` Firewallrules *FirewallRules `json:"firewallrules,omitempty"` + Flowlogs *FlowLogs `json:"flowlogs,omitempty"` } // NewNicEntities instantiates a new NicEntities object @@ -38,76 +38,76 @@ func NewNicEntitiesWithDefaults() *NicEntities { return &this } -// GetFlowlogs returns the Flowlogs field value -// If the value is explicit nil, the zero value for FlowLogs will be returned -func (o *NicEntities) GetFlowlogs() *FlowLogs { +// GetFirewallrules returns the Firewallrules field value +// If the value is explicit nil, nil is returned +func (o *NicEntities) GetFirewallrules() *FirewallRules { if o == nil { return nil } - return o.Flowlogs + return o.Firewallrules } -// GetFlowlogsOk returns a tuple with the Flowlogs field value +// GetFirewallrulesOk returns a tuple with the Firewallrules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicEntities) GetFlowlogsOk() (*FlowLogs, bool) { +func (o *NicEntities) GetFirewallrulesOk() (*FirewallRules, bool) { if o == nil { return nil, false } - return o.Flowlogs, true + return o.Firewallrules, true } -// SetFlowlogs sets field value -func (o *NicEntities) SetFlowlogs(v FlowLogs) { +// SetFirewallrules sets field value +func (o *NicEntities) SetFirewallrules(v FirewallRules) { - o.Flowlogs = &v + o.Firewallrules = &v } -// HasFlowlogs returns a boolean if a field has been set. -func (o *NicEntities) HasFlowlogs() bool { - if o != nil && o.Flowlogs != nil { +// HasFirewallrules returns a boolean if a field has been set. +func (o *NicEntities) HasFirewallrules() bool { + if o != nil && o.Firewallrules != nil { return true } return false } -// GetFirewallrules returns the Firewallrules field value -// If the value is explicit nil, the zero value for FirewallRules will be returned -func (o *NicEntities) GetFirewallrules() *FirewallRules { +// GetFlowlogs returns the Flowlogs field value +// If the value is explicit nil, nil is returned +func (o *NicEntities) GetFlowlogs() *FlowLogs { if o == nil { return nil } - return o.Firewallrules + return o.Flowlogs } -// GetFirewallrulesOk returns a tuple with the Firewallrules field value +// GetFlowlogsOk returns a tuple with the Flowlogs field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicEntities) GetFirewallrulesOk() (*FirewallRules, bool) { +func (o *NicEntities) GetFlowlogsOk() (*FlowLogs, bool) { if o == nil { return nil, false } - return o.Firewallrules, true + return o.Flowlogs, true } -// SetFirewallrules sets field value -func (o *NicEntities) SetFirewallrules(v FirewallRules) { +// SetFlowlogs sets field value +func (o *NicEntities) SetFlowlogs(v FlowLogs) { - o.Firewallrules = &v + o.Flowlogs = &v } -// HasFirewallrules returns a boolean if a field has been set. -func (o *NicEntities) HasFirewallrules() bool { - if o != nil && o.Firewallrules != nil { +// HasFlowlogs returns a boolean if a field has been set. +func (o *NicEntities) HasFlowlogs() bool { + if o != nil && o.Flowlogs != nil { return true } @@ -116,12 +116,14 @@ func (o *NicEntities) HasFirewallrules() bool { func (o NicEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Flowlogs != nil { - toSerialize["flowlogs"] = o.Flowlogs - } if o.Firewallrules != nil { toSerialize["firewallrules"] = o.Firewallrules } + + if o.Flowlogs != nil { + toSerialize["flowlogs"] = o.Flowlogs + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_properties.go index 17feb8a42bb4..c24c1a4ca950 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_properties.go @@ -16,24 +16,36 @@ import ( // NicProperties struct for NicProperties type NicProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // The MAC address of the NIC. - Mac *string `json:"mac,omitempty"` - // Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. - Ips *[]string `json:"ips,omitempty"` + // The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. + DeviceNumber *int32 `json:"deviceNumber,omitempty"` // Indicates if the NIC will reserve an IP using DHCP. Dhcp *bool `json:"dhcp,omitempty"` - // The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. - Lan *int32 `json:"lan"` + // Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilbool` can be used, or the setter `SetDhcpv6Nil` + Dhcpv6 *bool `json:"dhcpv6,omitempty"` // Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. FirewallActive *bool `json:"firewallActive,omitempty"` // The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. FirewallType *string `json:"firewallType,omitempty"` - // The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. - DeviceNumber *int32 `json:"deviceNumber,omitempty"` + // Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nil[]string` can be used, or the setter `SetIpsNil` + Ips *[]string `json:"ips,omitempty"` + // If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` + Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` + // If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nil[]string` can be used, or the setter `SetIpv6IpsNil` + Ipv6Ips *[]string `json:"ipv6Ips,omitempty"` + // The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. + Lan *int32 `json:"lan"` + // The MAC address of the NIC. + Mac *string `json:"mac,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` // The PCI slot number for the NIC. PciSlot *int32 `json:"pciSlot,omitempty"` + // The vnet ID that belongs to this NIC; Requires system privileges + Vnet *string `json:"vnet,omitempty"` } // NewNicProperties instantiates a new NicProperties object @@ -43,6 +55,8 @@ type NicProperties struct { func NewNicProperties(lan int32) *NicProperties { this := NicProperties{} + var dhcp bool = true + this.Dhcp = &dhcp this.Lan = &lan return &this @@ -53,79 +67,200 @@ func NewNicProperties(lan int32) *NicProperties { // but it doesn't guarantee that properties required by API are set func NewNicPropertiesWithDefaults() *NicProperties { this := NicProperties{} + var dhcp bool = true + this.Dhcp = &dhcp return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NicProperties) GetName() *string { +// GetDeviceNumber returns the DeviceNumber field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetDeviceNumber() *int32 { if o == nil { return nil } - return o.Name + return o.DeviceNumber } -// GetNameOk returns a tuple with the Name field value +// GetDeviceNumberOk returns a tuple with the DeviceNumber field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetNameOk() (*string, bool) { +func (o *NicProperties) GetDeviceNumberOk() (*int32, bool) { if o == nil { return nil, false } - return o.Name, true + return o.DeviceNumber, true } -// SetName sets field value -func (o *NicProperties) SetName(v string) { +// SetDeviceNumber sets field value +func (o *NicProperties) SetDeviceNumber(v int32) { - o.Name = &v + o.DeviceNumber = &v } -// HasName returns a boolean if a field has been set. -func (o *NicProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasDeviceNumber returns a boolean if a field has been set. +func (o *NicProperties) HasDeviceNumber() bool { + if o != nil && o.DeviceNumber != nil { return true } return false } -// GetMac returns the Mac field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NicProperties) GetMac() *string { +// GetDhcp returns the Dhcp field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetDhcp() *bool { if o == nil { return nil } - return o.Mac + return o.Dhcp } -// GetMacOk returns a tuple with the Mac field value +// GetDhcpOk returns a tuple with the Dhcp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetMacOk() (*string, bool) { +func (o *NicProperties) GetDhcpOk() (*bool, bool) { if o == nil { return nil, false } - return o.Mac, true + return o.Dhcp, true } -// SetMac sets field value -func (o *NicProperties) SetMac(v string) { +// SetDhcp sets field value +func (o *NicProperties) SetDhcp(v bool) { - o.Mac = &v + o.Dhcp = &v } -// HasMac returns a boolean if a field has been set. -func (o *NicProperties) HasMac() bool { - if o != nil && o.Mac != nil { +// HasDhcp returns a boolean if a field has been set. +func (o *NicProperties) HasDhcp() bool { + if o != nil && o.Dhcp != nil { + return true + } + + return false +} + +// GetDhcpv6 returns the Dhcpv6 field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetDhcpv6() *bool { + if o == nil { + return nil + } + + return o.Dhcpv6 + +} + +// GetDhcpv6Ok returns a tuple with the Dhcpv6 field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NicProperties) GetDhcpv6Ok() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.Dhcpv6, true +} + +// SetDhcpv6 sets field value +func (o *NicProperties) SetDhcpv6(v bool) { + + o.Dhcpv6 = &v + +} + +// sets Dhcpv6 to the explicit address that will be encoded as nil when marshaled +func (o *NicProperties) SetDhcpv6Nil() { + o.Dhcpv6 = &Nilbool +} + +// HasDhcpv6 returns a boolean if a field has been set. +func (o *NicProperties) HasDhcpv6() bool { + if o != nil && o.Dhcpv6 != nil { + return true + } + + return false +} + +// GetFirewallActive returns the FirewallActive field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetFirewallActive() *bool { + if o == nil { + return nil + } + + return o.FirewallActive + +} + +// GetFirewallActiveOk returns a tuple with the FirewallActive field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NicProperties) GetFirewallActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.FirewallActive, true +} + +// SetFirewallActive sets field value +func (o *NicProperties) SetFirewallActive(v bool) { + + o.FirewallActive = &v + +} + +// HasFirewallActive returns a boolean if a field has been set. +func (o *NicProperties) HasFirewallActive() bool { + if o != nil && o.FirewallActive != nil { + return true + } + + return false +} + +// GetFirewallType returns the FirewallType field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetFirewallType() *string { + if o == nil { + return nil + } + + return o.FirewallType + +} + +// GetFirewallTypeOk returns a tuple with the FirewallType field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NicProperties) GetFirewallTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.FirewallType, true +} + +// SetFirewallType sets field value +func (o *NicProperties) SetFirewallType(v string) { + + o.FirewallType = &v + +} + +// HasFirewallType returns a boolean if a field has been set. +func (o *NicProperties) HasFirewallType() bool { + if o != nil && o.FirewallType != nil { return true } @@ -133,7 +268,7 @@ func (o *NicProperties) HasMac() bool { } // GetIps returns the Ips field value -// If the value is explicit nil, the zero value for []string will be returned +// If the value is explicit nil, nil is returned func (o *NicProperties) GetIps() *[]string { if o == nil { return nil @@ -170,190 +305,195 @@ func (o *NicProperties) HasIps() bool { return false } -// GetDhcp returns the Dhcp field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *NicProperties) GetDhcp() *bool { +// GetIpv6CidrBlock returns the Ipv6CidrBlock field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetIpv6CidrBlock() *string { if o == nil { return nil } - return o.Dhcp + return o.Ipv6CidrBlock } -// GetDhcpOk returns a tuple with the Dhcp field value +// GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetDhcpOk() (*bool, bool) { +func (o *NicProperties) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } - return o.Dhcp, true + return o.Ipv6CidrBlock, true } -// SetDhcp sets field value -func (o *NicProperties) SetDhcp(v bool) { +// SetIpv6CidrBlock sets field value +func (o *NicProperties) SetIpv6CidrBlock(v string) { - o.Dhcp = &v + o.Ipv6CidrBlock = &v } -// HasDhcp returns a boolean if a field has been set. -func (o *NicProperties) HasDhcp() bool { - if o != nil && o.Dhcp != nil { +// sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled +func (o *NicProperties) SetIpv6CidrBlockNil() { + o.Ipv6CidrBlock = &Nilstring +} + +// HasIpv6CidrBlock returns a boolean if a field has been set. +func (o *NicProperties) HasIpv6CidrBlock() bool { + if o != nil && o.Ipv6CidrBlock != nil { return true } return false } -// GetLan returns the Lan field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NicProperties) GetLan() *int32 { +// GetIpv6Ips returns the Ipv6Ips field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetIpv6Ips() *[]string { if o == nil { return nil } - return o.Lan + return o.Ipv6Ips } -// GetLanOk returns a tuple with the Lan field value +// GetIpv6IpsOk returns a tuple with the Ipv6Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetLanOk() (*int32, bool) { +func (o *NicProperties) GetIpv6IpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Lan, true + return o.Ipv6Ips, true } -// SetLan sets field value -func (o *NicProperties) SetLan(v int32) { +// SetIpv6Ips sets field value +func (o *NicProperties) SetIpv6Ips(v []string) { - o.Lan = &v + o.Ipv6Ips = &v } -// HasLan returns a boolean if a field has been set. -func (o *NicProperties) HasLan() bool { - if o != nil && o.Lan != nil { +// HasIpv6Ips returns a boolean if a field has been set. +func (o *NicProperties) HasIpv6Ips() bool { + if o != nil && o.Ipv6Ips != nil { return true } return false } -// GetFirewallActive returns the FirewallActive field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *NicProperties) GetFirewallActive() *bool { +// GetLan returns the Lan field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetLan() *int32 { if o == nil { return nil } - return o.FirewallActive + return o.Lan } -// GetFirewallActiveOk returns a tuple with the FirewallActive field value +// GetLanOk returns a tuple with the Lan field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetFirewallActiveOk() (*bool, bool) { +func (o *NicProperties) GetLanOk() (*int32, bool) { if o == nil { return nil, false } - return o.FirewallActive, true + return o.Lan, true } -// SetFirewallActive sets field value -func (o *NicProperties) SetFirewallActive(v bool) { +// SetLan sets field value +func (o *NicProperties) SetLan(v int32) { - o.FirewallActive = &v + o.Lan = &v } -// HasFirewallActive returns a boolean if a field has been set. -func (o *NicProperties) HasFirewallActive() bool { - if o != nil && o.FirewallActive != nil { +// HasLan returns a boolean if a field has been set. +func (o *NicProperties) HasLan() bool { + if o != nil && o.Lan != nil { return true } return false } -// GetFirewallType returns the FirewallType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NicProperties) GetFirewallType() *string { +// GetMac returns the Mac field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetMac() *string { if o == nil { return nil } - return o.FirewallType + return o.Mac } -// GetFirewallTypeOk returns a tuple with the FirewallType field value +// GetMacOk returns a tuple with the Mac field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetFirewallTypeOk() (*string, bool) { +func (o *NicProperties) GetMacOk() (*string, bool) { if o == nil { return nil, false } - return o.FirewallType, true + return o.Mac, true } -// SetFirewallType sets field value -func (o *NicProperties) SetFirewallType(v string) { +// SetMac sets field value +func (o *NicProperties) SetMac(v string) { - o.FirewallType = &v + o.Mac = &v } -// HasFirewallType returns a boolean if a field has been set. -func (o *NicProperties) HasFirewallType() bool { - if o != nil && o.FirewallType != nil { +// HasMac returns a boolean if a field has been set. +func (o *NicProperties) HasMac() bool { + if o != nil && o.Mac != nil { return true } return false } -// GetDeviceNumber returns the DeviceNumber field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *NicProperties) GetDeviceNumber() *int32 { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetName() *string { if o == nil { return nil } - return o.DeviceNumber + return o.Name } -// GetDeviceNumberOk returns a tuple with the DeviceNumber field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicProperties) GetDeviceNumberOk() (*int32, bool) { +func (o *NicProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.DeviceNumber, true + return o.Name, true } -// SetDeviceNumber sets field value -func (o *NicProperties) SetDeviceNumber(v int32) { +// SetName sets field value +func (o *NicProperties) SetName(v string) { - o.DeviceNumber = &v + o.Name = &v } -// HasDeviceNumber returns a boolean if a field has been set. -func (o *NicProperties) HasDeviceNumber() bool { - if o != nil && o.DeviceNumber != nil { +// HasName returns a boolean if a field has been set. +func (o *NicProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -361,7 +501,7 @@ func (o *NicProperties) HasDeviceNumber() bool { } // GetPciSlot returns the PciSlot field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *NicProperties) GetPciSlot() *int32 { if o == nil { return nil @@ -398,33 +538,100 @@ func (o *NicProperties) HasPciSlot() bool { return false } +// GetVnet returns the Vnet field value +// If the value is explicit nil, nil is returned +func (o *NicProperties) GetVnet() *string { + if o == nil { + return nil + } + + return o.Vnet + +} + +// GetVnetOk returns a tuple with the Vnet field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NicProperties) GetVnetOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Vnet, true +} + +// SetVnet sets field value +func (o *NicProperties) SetVnet(v string) { + + o.Vnet = &v + +} + +// HasVnet returns a boolean if a field has been set. +func (o *NicProperties) HasVnet() bool { + if o != nil && o.Vnet != nil { + return true + } + + return false +} + func (o NicProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Mac != nil { - toSerialize["mac"] = o.Mac + if o.DeviceNumber != nil { + toSerialize["deviceNumber"] = o.DeviceNumber } - toSerialize["ips"] = o.Ips + if o.Dhcp != nil { toSerialize["dhcp"] = o.Dhcp } - if o.Lan != nil { - toSerialize["lan"] = o.Lan + + if o.Dhcpv6 == &Nilbool { + toSerialize["dhcpv6"] = nil + } else if o.Dhcpv6 != nil { + toSerialize["dhcpv6"] = o.Dhcpv6 } if o.FirewallActive != nil { toSerialize["firewallActive"] = o.FirewallActive } + if o.FirewallType != nil { toSerialize["firewallType"] = o.FirewallType } - if o.DeviceNumber != nil { - toSerialize["deviceNumber"] = o.DeviceNumber + + if o.Ips != nil { + toSerialize["ips"] = o.Ips + } + + if o.Ipv6CidrBlock == &Nilstring { + toSerialize["ipv6CidrBlock"] = nil + } else if o.Ipv6CidrBlock != nil { + toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock + } + + if o.Ipv6Ips != nil { + toSerialize["ipv6Ips"] = o.Ipv6Ips + } + if o.Lan != nil { + toSerialize["lan"] = o.Lan + } + + if o.Mac != nil { + toSerialize["mac"] = o.Mac + } + + if o.Name != nil { + toSerialize["name"] = o.Name } + if o.PciSlot != nil { toSerialize["pciSlot"] = o.PciSlot } + + if o.Vnet != nil { + toSerialize["vnet"] = o.Vnet + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_put.go index e37c81075e96..0029a6eab01a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nic_put.go @@ -16,13 +16,13 @@ import ( // NicPut struct for NicPut type NicPut struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Properties *NicProperties `json:"properties"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Properties *NicProperties `json:"properties"` } // NewNicPut instantiates a new NicPut object @@ -45,152 +45,152 @@ func NewNicPutWithDefaults() *NicPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NicPut) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *NicPut) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicPut) GetIdOk() (*string, bool) { +func (o *NicPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *NicPut) SetId(v string) { +// SetHref sets field value +func (o *NicPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *NicPut) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *NicPut) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *NicPut) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *NicPut) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicPut) GetTypeOk() (*Type, bool) { +func (o *NicPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *NicPut) SetType(v Type) { +// SetId sets field value +func (o *NicPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *NicPut) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *NicPut) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NicPut) GetHref() *string { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *NicPut) GetProperties() *NicProperties { if o == nil { return nil } - return o.Href + return o.Properties } -// GetHrefOk returns a tuple with the Href field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicPut) GetHrefOk() (*string, bool) { +func (o *NicPut) GetPropertiesOk() (*NicProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *NicPut) SetHref(v string) { +// SetProperties sets field value +func (o *NicPut) SetProperties(v NicProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *NicPut) HasHref() bool { - if o != nil && o.Href != nil { +// HasProperties returns a boolean if a field has been set. +func (o *NicPut) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for NicProperties will be returned -func (o *NicPut) GetProperties() *NicProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *NicPut) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NicPut) GetPropertiesOk() (*NicProperties, bool) { +func (o *NicPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *NicPut) SetProperties(v NicProperties) { +// SetType sets field value +func (o *NicPut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *NicPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *NicPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *NicPut) HasProperties() bool { func (o NicPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nics.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nics.go index 80ff9957fbbc..6fe1220a4881 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nics.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_nics.go @@ -16,19 +16,19 @@ import ( // Nics struct for Nics type Nics struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Nic `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewNics instantiates a new Nics object @@ -49,114 +49,114 @@ func NewNicsWithDefaults() *Nics { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Nics) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Nics) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nics) GetIdOk() (*string, bool) { +func (o *Nics) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Nics) SetId(v string) { +// SetLinks sets field value +func (o *Nics) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Nics) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Nics) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Nics) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Nics) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nics) GetTypeOk() (*Type, bool) { +func (o *Nics) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Nics) SetType(v Type) { +// SetHref sets field value +func (o *Nics) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Nics) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Nics) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Nics) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Nics) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nics) GetHrefOk() (*string, bool) { +func (o *Nics) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Nics) SetHref(v string) { +// SetId sets field value +func (o *Nics) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Nics) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Nics) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Nics) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Nic will be returned +// If the value is explicit nil, nil is returned func (o *Nics) GetItems() *[]Nic { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Nics) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Nics) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Nics) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nics) GetOffsetOk() (*float32, bool) { +func (o *Nics) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Nics) SetOffset(v float32) { +// SetLimit sets field value +func (o *Nics) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Nics) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Nics) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Nics) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Nics) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nics) GetLimitOk() (*float32, bool) { +func (o *Nics) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Nics) SetLimit(v float32) { +// SetOffset sets field value +func (o *Nics) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Nics) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Nics) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Nics) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Nics) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Nics) GetLinksOk() (*PaginationLinks, bool) { +func (o *Nics) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Nics) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Nics) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Nics) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Nics) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Nics) HasLinks() bool { func (o Nics) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_no_state_meta_data.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_no_state_meta_data.go index 4d1488a1de22..bf6d643dd42a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_no_state_meta_data.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_no_state_meta_data.go @@ -17,20 +17,20 @@ import ( // NoStateMetaData struct for NoStateMetaData type NoStateMetaData struct { - // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. - Etag *string `json:"etag,omitempty"` - // The time when the resource was created. - CreatedDate *IonosTime // The user who has created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The unique ID of the user who created the resource. CreatedByUserId *string `json:"createdByUserId,omitempty"` - // The last time the resource was modified. - LastModifiedDate *IonosTime + // The time when the resource was created. + CreatedDate *IonosTime + // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. + Etag *string `json:"etag,omitempty"` // The user who last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The unique ID of the user who last modified the resource. LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` + // The last time the resource was modified. + LastModifiedDate *IonosTime } // NewNoStateMetaData instantiates a new NoStateMetaData object @@ -51,91 +51,8 @@ func NewNoStateMetaDataWithDefaults() *NoStateMetaData { return &this } -// GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *NoStateMetaData) GetEtag() *string { - if o == nil { - return nil - } - - return o.Etag - -} - -// GetEtagOk returns a tuple with the Etag field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NoStateMetaData) GetEtagOk() (*string, bool) { - if o == nil { - return nil, false - } - - return o.Etag, true -} - -// SetEtag sets field value -func (o *NoStateMetaData) SetEtag(v string) { - - o.Etag = &v - -} - -// HasEtag returns a boolean if a field has been set. -func (o *NoStateMetaData) HasEtag() bool { - if o != nil && o.Etag != nil { - return true - } - - return false -} - -// GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *NoStateMetaData) GetCreatedDate() *time.Time { - if o == nil { - return nil - } - - if o.CreatedDate == nil { - return nil - } - return &o.CreatedDate.Time - -} - -// GetCreatedDateOk returns a tuple with the CreatedDate field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NoStateMetaData) GetCreatedDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - - if o.CreatedDate == nil { - return nil, false - } - return &o.CreatedDate.Time, true - -} - -// SetCreatedDate sets field value -func (o *NoStateMetaData) SetCreatedDate(v time.Time) { - - o.CreatedDate = &IonosTime{v} - -} - -// HasCreatedDate returns a boolean if a field has been set. -func (o *NoStateMetaData) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { - return true - } - - return false -} - // GetCreatedBy returns the CreatedBy field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetCreatedBy() *string { if o == nil { return nil @@ -173,7 +90,7 @@ func (o *NoStateMetaData) HasCreatedBy() bool { } // GetCreatedByUserId returns the CreatedByUserId field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetCreatedByUserId() *string { if o == nil { return nil @@ -210,45 +127,83 @@ func (o *NoStateMetaData) HasCreatedByUserId() bool { return false } -// GetLastModifiedDate returns the LastModifiedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *NoStateMetaData) GetLastModifiedDate() *time.Time { +// GetCreatedDate returns the CreatedDate field value +// If the value is explicit nil, nil is returned +func (o *NoStateMetaData) GetCreatedDate() *time.Time { if o == nil { return nil } - if o.LastModifiedDate == nil { + if o.CreatedDate == nil { return nil } - return &o.LastModifiedDate.Time + return &o.CreatedDate.Time } -// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value +// GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *NoStateMetaData) GetLastModifiedDateOk() (*time.Time, bool) { +func (o *NoStateMetaData) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - if o.LastModifiedDate == nil { + if o.CreatedDate == nil { return nil, false } - return &o.LastModifiedDate.Time, true + return &o.CreatedDate.Time, true } -// SetLastModifiedDate sets field value -func (o *NoStateMetaData) SetLastModifiedDate(v time.Time) { +// SetCreatedDate sets field value +func (o *NoStateMetaData) SetCreatedDate(v time.Time) { - o.LastModifiedDate = &IonosTime{v} + o.CreatedDate = &IonosTime{v} } -// HasLastModifiedDate returns a boolean if a field has been set. -func (o *NoStateMetaData) HasLastModifiedDate() bool { - if o != nil && o.LastModifiedDate != nil { +// HasCreatedDate returns a boolean if a field has been set. +func (o *NoStateMetaData) HasCreatedDate() bool { + if o != nil && o.CreatedDate != nil { + return true + } + + return false +} + +// GetEtag returns the Etag field value +// If the value is explicit nil, nil is returned +func (o *NoStateMetaData) GetEtag() *string { + if o == nil { + return nil + } + + return o.Etag + +} + +// GetEtagOk returns a tuple with the Etag field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NoStateMetaData) GetEtagOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Etag, true +} + +// SetEtag sets field value +func (o *NoStateMetaData) SetEtag(v string) { + + o.Etag = &v + +} + +// HasEtag returns a boolean if a field has been set. +func (o *NoStateMetaData) HasEtag() bool { + if o != nil && o.Etag != nil { return true } @@ -256,7 +211,7 @@ func (o *NoStateMetaData) HasLastModifiedDate() bool { } // GetLastModifiedBy returns the LastModifiedBy field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetLastModifiedBy() *string { if o == nil { return nil @@ -294,7 +249,7 @@ func (o *NoStateMetaData) HasLastModifiedBy() bool { } // GetLastModifiedByUserId returns the LastModifiedByUserId field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetLastModifiedByUserId() *string { if o == nil { return nil @@ -331,29 +286,81 @@ func (o *NoStateMetaData) HasLastModifiedByUserId() bool { return false } -func (o NoStateMetaData) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Etag != nil { - toSerialize["etag"] = o.Etag +// GetLastModifiedDate returns the LastModifiedDate field value +// If the value is explicit nil, nil is returned +func (o *NoStateMetaData) GetLastModifiedDate() *time.Time { + if o == nil { + return nil } - if o.CreatedDate != nil { - toSerialize["createdDate"] = o.CreatedDate + + if o.LastModifiedDate == nil { + return nil + } + return &o.LastModifiedDate.Time + +} + +// GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NoStateMetaData) GetLastModifiedDateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + + if o.LastModifiedDate == nil { + return nil, false + } + return &o.LastModifiedDate.Time, true + +} + +// SetLastModifiedDate sets field value +func (o *NoStateMetaData) SetLastModifiedDate(v time.Time) { + + o.LastModifiedDate = &IonosTime{v} + +} + +// HasLastModifiedDate returns a boolean if a field has been set. +func (o *NoStateMetaData) HasLastModifiedDate() bool { + if o != nil && o.LastModifiedDate != nil { + return true } + + return false +} + +func (o NoStateMetaData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } + if o.CreatedByUserId != nil { toSerialize["createdByUserId"] = o.CreatedByUserId } - if o.LastModifiedDate != nil { - toSerialize["lastModifiedDate"] = o.LastModifiedDate + + if o.CreatedDate != nil { + toSerialize["createdDate"] = o.CreatedDate + } + + if o.Etag != nil { + toSerialize["etag"] = o.Etag } + if o.LastModifiedBy != nil { toSerialize["lastModifiedBy"] = o.LastModifiedBy } + if o.LastModifiedByUserId != nil { toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId } + + if o.LastModifiedDate != nil { + toSerialize["lastModifiedDate"] = o.LastModifiedDate + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_pagination_links.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_pagination_links.go index fa3c76dee8d4..5b8bef3043f3 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_pagination_links.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_pagination_links.go @@ -16,12 +16,12 @@ import ( // PaginationLinks struct for PaginationLinks type PaginationLinks struct { + // URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. + Next *string `json:"next,omitempty"` // URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. Prev *string `json:"prev,omitempty"` // URL (with offset and limit parameters) of the current page. Self *string `json:"self,omitempty"` - // URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. - Next *string `json:"next,omitempty"` } // NewPaginationLinks instantiates a new PaginationLinks object @@ -42,114 +42,114 @@ func NewPaginationLinksWithDefaults() *PaginationLinks { return &this } -// GetPrev returns the Prev field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PaginationLinks) GetPrev() *string { +// GetNext returns the Next field value +// If the value is explicit nil, nil is returned +func (o *PaginationLinks) GetNext() *string { if o == nil { return nil } - return o.Prev + return o.Next } -// GetPrevOk returns a tuple with the Prev field value +// GetNextOk returns a tuple with the Next field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PaginationLinks) GetPrevOk() (*string, bool) { +func (o *PaginationLinks) GetNextOk() (*string, bool) { if o == nil { return nil, false } - return o.Prev, true + return o.Next, true } -// SetPrev sets field value -func (o *PaginationLinks) SetPrev(v string) { +// SetNext sets field value +func (o *PaginationLinks) SetNext(v string) { - o.Prev = &v + o.Next = &v } -// HasPrev returns a boolean if a field has been set. -func (o *PaginationLinks) HasPrev() bool { - if o != nil && o.Prev != nil { +// HasNext returns a boolean if a field has been set. +func (o *PaginationLinks) HasNext() bool { + if o != nil && o.Next != nil { return true } return false } -// GetSelf returns the Self field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PaginationLinks) GetSelf() *string { +// GetPrev returns the Prev field value +// If the value is explicit nil, nil is returned +func (o *PaginationLinks) GetPrev() *string { if o == nil { return nil } - return o.Self + return o.Prev } -// GetSelfOk returns a tuple with the Self field value +// GetPrevOk returns a tuple with the Prev field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PaginationLinks) GetSelfOk() (*string, bool) { +func (o *PaginationLinks) GetPrevOk() (*string, bool) { if o == nil { return nil, false } - return o.Self, true + return o.Prev, true } -// SetSelf sets field value -func (o *PaginationLinks) SetSelf(v string) { +// SetPrev sets field value +func (o *PaginationLinks) SetPrev(v string) { - o.Self = &v + o.Prev = &v } -// HasSelf returns a boolean if a field has been set. -func (o *PaginationLinks) HasSelf() bool { - if o != nil && o.Self != nil { +// HasPrev returns a boolean if a field has been set. +func (o *PaginationLinks) HasPrev() bool { + if o != nil && o.Prev != nil { return true } return false } -// GetNext returns the Next field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PaginationLinks) GetNext() *string { +// GetSelf returns the Self field value +// If the value is explicit nil, nil is returned +func (o *PaginationLinks) GetSelf() *string { if o == nil { return nil } - return o.Next + return o.Self } -// GetNextOk returns a tuple with the Next field value +// GetSelfOk returns a tuple with the Self field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PaginationLinks) GetNextOk() (*string, bool) { +func (o *PaginationLinks) GetSelfOk() (*string, bool) { if o == nil { return nil, false } - return o.Next, true + return o.Self, true } -// SetNext sets field value -func (o *PaginationLinks) SetNext(v string) { +// SetSelf sets field value +func (o *PaginationLinks) SetSelf(v string) { - o.Next = &v + o.Self = &v } -// HasNext returns a boolean if a field has been set. -func (o *PaginationLinks) HasNext() bool { - if o != nil && o.Next != nil { +// HasSelf returns a boolean if a field has been set. +func (o *PaginationLinks) HasSelf() bool { + if o != nil && o.Self != nil { return true } @@ -158,15 +158,18 @@ func (o *PaginationLinks) HasNext() bool { func (o PaginationLinks) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.Next != nil { + toSerialize["next"] = o.Next + } + if o.Prev != nil { toSerialize["prev"] = o.Prev } + if o.Self != nil { toSerialize["self"] = o.Self } - if o.Next != nil { - toSerialize["next"] = o.Next - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_peer.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_peer.go index db7c562be663..582ff98a9468 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_peer.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_peer.go @@ -16,11 +16,11 @@ import ( // Peer struct for Peer type Peer struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` DatacenterId *string `json:"datacenterId,omitempty"` DatacenterName *string `json:"datacenterName,omitempty"` + Id *string `json:"id,omitempty"` Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` } // NewPeer instantiates a new Peer object @@ -41,190 +41,190 @@ func NewPeerWithDefaults() *Peer { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Peer) GetId() *string { +// GetDatacenterId returns the DatacenterId field value +// If the value is explicit nil, nil is returned +func (o *Peer) GetDatacenterId() *string { if o == nil { return nil } - return o.Id + return o.DatacenterId } -// GetIdOk returns a tuple with the Id field value +// GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Peer) GetIdOk() (*string, bool) { +func (o *Peer) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.DatacenterId, true } -// SetId sets field value -func (o *Peer) SetId(v string) { +// SetDatacenterId sets field value +func (o *Peer) SetDatacenterId(v string) { - o.Id = &v + o.DatacenterId = &v } -// HasId returns a boolean if a field has been set. -func (o *Peer) HasId() bool { - if o != nil && o.Id != nil { +// HasDatacenterId returns a boolean if a field has been set. +func (o *Peer) HasDatacenterId() bool { + if o != nil && o.DatacenterId != nil { return true } return false } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Peer) GetName() *string { +// GetDatacenterName returns the DatacenterName field value +// If the value is explicit nil, nil is returned +func (o *Peer) GetDatacenterName() *string { if o == nil { return nil } - return o.Name + return o.DatacenterName } -// GetNameOk returns a tuple with the Name field value +// GetDatacenterNameOk returns a tuple with the DatacenterName field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Peer) GetNameOk() (*string, bool) { +func (o *Peer) GetDatacenterNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.DatacenterName, true } -// SetName sets field value -func (o *Peer) SetName(v string) { +// SetDatacenterName sets field value +func (o *Peer) SetDatacenterName(v string) { - o.Name = &v + o.DatacenterName = &v } -// HasName returns a boolean if a field has been set. -func (o *Peer) HasName() bool { - if o != nil && o.Name != nil { +// HasDatacenterName returns a boolean if a field has been set. +func (o *Peer) HasDatacenterName() bool { + if o != nil && o.DatacenterName != nil { return true } return false } -// GetDatacenterId returns the DatacenterId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Peer) GetDatacenterId() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Peer) GetId() *string { if o == nil { return nil } - return o.DatacenterId + return o.Id } -// GetDatacenterIdOk returns a tuple with the DatacenterId field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Peer) GetDatacenterIdOk() (*string, bool) { +func (o *Peer) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.DatacenterId, true + return o.Id, true } -// SetDatacenterId sets field value -func (o *Peer) SetDatacenterId(v string) { +// SetId sets field value +func (o *Peer) SetId(v string) { - o.DatacenterId = &v + o.Id = &v } -// HasDatacenterId returns a boolean if a field has been set. -func (o *Peer) HasDatacenterId() bool { - if o != nil && o.DatacenterId != nil { +// HasId returns a boolean if a field has been set. +func (o *Peer) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetDatacenterName returns the DatacenterName field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Peer) GetDatacenterName() *string { +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *Peer) GetLocation() *string { if o == nil { return nil } - return o.DatacenterName + return o.Location } -// GetDatacenterNameOk returns a tuple with the DatacenterName field value +// GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Peer) GetDatacenterNameOk() (*string, bool) { +func (o *Peer) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - return o.DatacenterName, true + return o.Location, true } -// SetDatacenterName sets field value -func (o *Peer) SetDatacenterName(v string) { +// SetLocation sets field value +func (o *Peer) SetLocation(v string) { - o.DatacenterName = &v + o.Location = &v } -// HasDatacenterName returns a boolean if a field has been set. -func (o *Peer) HasDatacenterName() bool { - if o != nil && o.DatacenterName != nil { +// HasLocation returns a boolean if a field has been set. +func (o *Peer) HasLocation() bool { + if o != nil && o.Location != nil { return true } return false } -// GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Peer) GetLocation() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *Peer) GetName() *string { if o == nil { return nil } - return o.Location + return o.Name } -// GetLocationOk returns a tuple with the Location field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Peer) GetLocationOk() (*string, bool) { +func (o *Peer) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Location, true + return o.Name, true } -// SetLocation sets field value -func (o *Peer) SetLocation(v string) { +// SetName sets field value +func (o *Peer) SetName(v string) { - o.Location = &v + o.Name = &v } -// HasLocation returns a boolean if a field has been set. -func (o *Peer) HasLocation() bool { - if o != nil && o.Location != nil { +// HasName returns a boolean if a field has been set. +func (o *Peer) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -233,21 +233,26 @@ func (o *Peer) HasLocation() bool { func (o Peer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } if o.DatacenterId != nil { toSerialize["datacenterId"] = o.DatacenterId } + if o.DatacenterName != nil { toSerialize["datacenterName"] = o.DatacenterName } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Location != nil { toSerialize["location"] = o.Location } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect.go index f0aa7eb8f50c..1a417e85c5ee 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect.go @@ -16,14 +16,14 @@ import ( // PrivateCrossConnect struct for PrivateCrossConnect type PrivateCrossConnect struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *PrivateCrossConnectProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewPrivateCrossConnect instantiates a new PrivateCrossConnect object @@ -46,190 +46,190 @@ func NewPrivateCrossConnectWithDefaults() *PrivateCrossConnect { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PrivateCrossConnect) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnect) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnect) GetIdOk() (*string, bool) { +func (o *PrivateCrossConnect) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *PrivateCrossConnect) SetId(v string) { +// SetHref sets field value +func (o *PrivateCrossConnect) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *PrivateCrossConnect) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *PrivateCrossConnect) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *PrivateCrossConnect) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnect) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnect) GetTypeOk() (*Type, bool) { +func (o *PrivateCrossConnect) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *PrivateCrossConnect) SetType(v Type) { +// SetId sets field value +func (o *PrivateCrossConnect) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *PrivateCrossConnect) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *PrivateCrossConnect) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PrivateCrossConnect) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnect) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnect) GetHrefOk() (*string, bool) { +func (o *PrivateCrossConnect) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *PrivateCrossConnect) SetHref(v string) { +// SetMetadata sets field value +func (o *PrivateCrossConnect) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *PrivateCrossConnect) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *PrivateCrossConnect) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *PrivateCrossConnect) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnect) GetProperties() *PrivateCrossConnectProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnect) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *PrivateCrossConnect) GetPropertiesOk() (*PrivateCrossConnectProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *PrivateCrossConnect) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *PrivateCrossConnect) SetProperties(v PrivateCrossConnectProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *PrivateCrossConnect) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *PrivateCrossConnect) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for PrivateCrossConnectProperties will be returned -func (o *PrivateCrossConnect) GetProperties() *PrivateCrossConnectProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnect) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnect) GetPropertiesOk() (*PrivateCrossConnectProperties, bool) { +func (o *PrivateCrossConnect) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *PrivateCrossConnect) SetProperties(v PrivateCrossConnectProperties) { +// SetType sets field value +func (o *PrivateCrossConnect) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *PrivateCrossConnect) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *PrivateCrossConnect) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *PrivateCrossConnect) HasProperties() bool { func (o PrivateCrossConnect) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect_properties.go index a92dc80982ee..864e5ada1ea2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connect_properties.go @@ -16,14 +16,14 @@ import ( // PrivateCrossConnectProperties struct for PrivateCrossConnectProperties type PrivateCrossConnectProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` + // Read-Only attribute. Lists data centers that can be joined to this private Cross-Connect. + ConnectableDatacenters *[]ConnectableDatacenter `json:"connectableDatacenters,omitempty"` // Human-readable description. Description *string `json:"description,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` // Read-Only attribute. Lists LAN's joined to this private Cross-Connect. Peers *[]Peer `json:"peers,omitempty"` - // Read-Only attribute. Lists data centers that can be joined to this private Cross-Connect. - ConnectableDatacenters *[]ConnectableDatacenter `json:"connectableDatacenters,omitempty"` } // NewPrivateCrossConnectProperties instantiates a new PrivateCrossConnectProperties object @@ -44,38 +44,38 @@ func NewPrivateCrossConnectPropertiesWithDefaults() *PrivateCrossConnectProperti return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PrivateCrossConnectProperties) GetName() *string { +// GetConnectableDatacenters returns the ConnectableDatacenters field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnectProperties) GetConnectableDatacenters() *[]ConnectableDatacenter { if o == nil { return nil } - return o.Name + return o.ConnectableDatacenters } -// GetNameOk returns a tuple with the Name field value +// GetConnectableDatacentersOk returns a tuple with the ConnectableDatacenters field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnectProperties) GetNameOk() (*string, bool) { +func (o *PrivateCrossConnectProperties) GetConnectableDatacentersOk() (*[]ConnectableDatacenter, bool) { if o == nil { return nil, false } - return o.Name, true + return o.ConnectableDatacenters, true } -// SetName sets field value -func (o *PrivateCrossConnectProperties) SetName(v string) { +// SetConnectableDatacenters sets field value +func (o *PrivateCrossConnectProperties) SetConnectableDatacenters(v []ConnectableDatacenter) { - o.Name = &v + o.ConnectableDatacenters = &v } -// HasName returns a boolean if a field has been set. -func (o *PrivateCrossConnectProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasConnectableDatacenters returns a boolean if a field has been set. +func (o *PrivateCrossConnectProperties) HasConnectableDatacenters() bool { + if o != nil && o.ConnectableDatacenters != nil { return true } @@ -83,7 +83,7 @@ func (o *PrivateCrossConnectProperties) HasName() bool { } // GetDescription returns the Description field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *PrivateCrossConnectProperties) GetDescription() *string { if o == nil { return nil @@ -120,76 +120,76 @@ func (o *PrivateCrossConnectProperties) HasDescription() bool { return false } -// GetPeers returns the Peers field value -// If the value is explicit nil, the zero value for []Peer will be returned -func (o *PrivateCrossConnectProperties) GetPeers() *[]Peer { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnectProperties) GetName() *string { if o == nil { return nil } - return o.Peers + return o.Name } -// GetPeersOk returns a tuple with the Peers field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnectProperties) GetPeersOk() (*[]Peer, bool) { +func (o *PrivateCrossConnectProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Peers, true + return o.Name, true } -// SetPeers sets field value -func (o *PrivateCrossConnectProperties) SetPeers(v []Peer) { +// SetName sets field value +func (o *PrivateCrossConnectProperties) SetName(v string) { - o.Peers = &v + o.Name = &v } -// HasPeers returns a boolean if a field has been set. -func (o *PrivateCrossConnectProperties) HasPeers() bool { - if o != nil && o.Peers != nil { +// HasName returns a boolean if a field has been set. +func (o *PrivateCrossConnectProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetConnectableDatacenters returns the ConnectableDatacenters field value -// If the value is explicit nil, the zero value for []ConnectableDatacenter will be returned -func (o *PrivateCrossConnectProperties) GetConnectableDatacenters() *[]ConnectableDatacenter { +// GetPeers returns the Peers field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnectProperties) GetPeers() *[]Peer { if o == nil { return nil } - return o.ConnectableDatacenters + return o.Peers } -// GetConnectableDatacentersOk returns a tuple with the ConnectableDatacenters field value +// GetPeersOk returns a tuple with the Peers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnectProperties) GetConnectableDatacentersOk() (*[]ConnectableDatacenter, bool) { +func (o *PrivateCrossConnectProperties) GetPeersOk() (*[]Peer, bool) { if o == nil { return nil, false } - return o.ConnectableDatacenters, true + return o.Peers, true } -// SetConnectableDatacenters sets field value -func (o *PrivateCrossConnectProperties) SetConnectableDatacenters(v []ConnectableDatacenter) { +// SetPeers sets field value +func (o *PrivateCrossConnectProperties) SetPeers(v []Peer) { - o.ConnectableDatacenters = &v + o.Peers = &v } -// HasConnectableDatacenters returns a boolean if a field has been set. -func (o *PrivateCrossConnectProperties) HasConnectableDatacenters() bool { - if o != nil && o.ConnectableDatacenters != nil { +// HasPeers returns a boolean if a field has been set. +func (o *PrivateCrossConnectProperties) HasPeers() bool { + if o != nil && o.Peers != nil { return true } @@ -198,18 +198,22 @@ func (o *PrivateCrossConnectProperties) HasConnectableDatacenters() bool { func (o PrivateCrossConnectProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.ConnectableDatacenters != nil { + toSerialize["connectableDatacenters"] = o.ConnectableDatacenters } + if o.Description != nil { toSerialize["description"] = o.Description } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Peers != nil { toSerialize["peers"] = o.Peers } - if o.ConnectableDatacenters != nil { - toSerialize["connectableDatacenters"] = o.ConnectableDatacenters - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connects.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connects.go index 7112f9a35aa5..3c82ad39f7ea 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connects.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_private_cross_connects.go @@ -16,14 +16,14 @@ import ( // PrivateCrossConnects struct for PrivateCrossConnects type PrivateCrossConnects struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]PrivateCrossConnect `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewPrivateCrossConnects instantiates a new PrivateCrossConnects object @@ -44,152 +44,152 @@ func NewPrivateCrossConnectsWithDefaults() *PrivateCrossConnects { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PrivateCrossConnects) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnects) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnects) GetIdOk() (*string, bool) { +func (o *PrivateCrossConnects) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *PrivateCrossConnects) SetId(v string) { +// SetHref sets field value +func (o *PrivateCrossConnects) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *PrivateCrossConnects) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *PrivateCrossConnects) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *PrivateCrossConnects) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnects) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnects) GetTypeOk() (*Type, bool) { +func (o *PrivateCrossConnects) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *PrivateCrossConnects) SetType(v Type) { +// SetId sets field value +func (o *PrivateCrossConnects) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *PrivateCrossConnects) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *PrivateCrossConnects) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *PrivateCrossConnects) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnects) GetItems() *[]PrivateCrossConnect { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnects) GetHrefOk() (*string, bool) { +func (o *PrivateCrossConnects) GetItemsOk() (*[]PrivateCrossConnect, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *PrivateCrossConnects) SetHref(v string) { +// SetItems sets field value +func (o *PrivateCrossConnects) SetItems(v []PrivateCrossConnect) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *PrivateCrossConnects) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *PrivateCrossConnects) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []PrivateCrossConnect will be returned -func (o *PrivateCrossConnects) GetItems() *[]PrivateCrossConnect { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *PrivateCrossConnects) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PrivateCrossConnects) GetItemsOk() (*[]PrivateCrossConnect, bool) { +func (o *PrivateCrossConnects) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *PrivateCrossConnects) SetItems(v []PrivateCrossConnect) { +// SetType sets field value +func (o *PrivateCrossConnects) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *PrivateCrossConnects) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *PrivateCrossConnects) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *PrivateCrossConnects) HasItems() bool { func (o PrivateCrossConnects) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_remote_console_url.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_remote_console_url.go index 4088c7a8c36b..74f96ce383d8 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_remote_console_url.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_remote_console_url.go @@ -39,7 +39,7 @@ func NewRemoteConsoleUrlWithDefaults() *RemoteConsoleUrl { } // GetUrl returns the Url field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *RemoteConsoleUrl) GetUrl() *string { if o == nil { return nil @@ -81,6 +81,7 @@ func (o RemoteConsoleUrl) MarshalJSON() ([]byte, error) { if o.Url != nil { toSerialize["url"] = o.Url } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request.go index 5ac4f4851d18..adc351ff9547 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request.go @@ -16,14 +16,14 @@ import ( // Request struct for Request type Request struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *RequestMetadata `json:"metadata,omitempty"` Properties *RequestProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewRequest instantiates a new Request object @@ -46,190 +46,190 @@ func NewRequestWithDefaults() *Request { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Request) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Request) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Request) GetIdOk() (*string, bool) { +func (o *Request) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Request) SetId(v string) { +// SetHref sets field value +func (o *Request) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Request) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Request) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Request) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Request) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Request) GetTypeOk() (*Type, bool) { +func (o *Request) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Request) SetType(v Type) { +// SetId sets field value +func (o *Request) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Request) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Request) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Request) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Request) GetMetadata() *RequestMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Request) GetHrefOk() (*string, bool) { +func (o *Request) GetMetadataOk() (*RequestMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Request) SetHref(v string) { +// SetMetadata sets field value +func (o *Request) SetMetadata(v RequestMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Request) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Request) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for RequestMetadata will be returned -func (o *Request) GetMetadata() *RequestMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Request) GetProperties() *RequestProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Request) GetMetadataOk() (*RequestMetadata, bool) { +func (o *Request) GetPropertiesOk() (*RequestProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Request) SetMetadata(v RequestMetadata) { +// SetProperties sets field value +func (o *Request) SetProperties(v RequestProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Request) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Request) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for RequestProperties will be returned -func (o *Request) GetProperties() *RequestProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Request) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Request) GetPropertiesOk() (*RequestProperties, bool) { +func (o *Request) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Request) SetProperties(v RequestProperties) { +// SetType sets field value +func (o *Request) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Request) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Request) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Request) HasProperties() bool { func (o Request) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_metadata.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_metadata.go index 3ea319b31320..1b634615ec4c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_metadata.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_metadata.go @@ -17,10 +17,10 @@ import ( // RequestMetadata struct for RequestMetadata type RequestMetadata struct { - // The last time the resource was created. - CreatedDate *IonosTime // The user who created the resource. CreatedBy *string `json:"createdBy,omitempty"` + // The last time the resource was created. + CreatedDate *IonosTime // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` RequestStatus *RequestStatus `json:"requestStatus,omitempty"` @@ -44,83 +44,83 @@ func NewRequestMetadataWithDefaults() *RequestMetadata { return &this } -// GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *RequestMetadata) GetCreatedDate() *time.Time { +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, nil is returned +func (o *RequestMetadata) GetCreatedBy() *string { if o == nil { return nil } - if o.CreatedDate == nil { - return nil - } - return &o.CreatedDate.Time + return o.CreatedBy } -// GetCreatedDateOk returns a tuple with the CreatedDate field value +// GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestMetadata) GetCreatedDateOk() (*time.Time, bool) { +func (o *RequestMetadata) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } - if o.CreatedDate == nil { - return nil, false - } - return &o.CreatedDate.Time, true - + return o.CreatedBy, true } -// SetCreatedDate sets field value -func (o *RequestMetadata) SetCreatedDate(v time.Time) { +// SetCreatedBy sets field value +func (o *RequestMetadata) SetCreatedBy(v string) { - o.CreatedDate = &IonosTime{v} + o.CreatedBy = &v } -// HasCreatedDate returns a boolean if a field has been set. -func (o *RequestMetadata) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { +// HasCreatedBy returns a boolean if a field has been set. +func (o *RequestMetadata) HasCreatedBy() bool { + if o != nil && o.CreatedBy != nil { return true } return false } -// GetCreatedBy returns the CreatedBy field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestMetadata) GetCreatedBy() *string { +// GetCreatedDate returns the CreatedDate field value +// If the value is explicit nil, nil is returned +func (o *RequestMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } - return o.CreatedBy + if o.CreatedDate == nil { + return nil + } + return &o.CreatedDate.Time } -// GetCreatedByOk returns a tuple with the CreatedBy field value +// GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestMetadata) GetCreatedByOk() (*string, bool) { +func (o *RequestMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.CreatedBy, true + if o.CreatedDate == nil { + return nil, false + } + return &o.CreatedDate.Time, true + } -// SetCreatedBy sets field value -func (o *RequestMetadata) SetCreatedBy(v string) { +// SetCreatedDate sets field value +func (o *RequestMetadata) SetCreatedDate(v time.Time) { - o.CreatedBy = &v + o.CreatedDate = &IonosTime{v} } -// HasCreatedBy returns a boolean if a field has been set. -func (o *RequestMetadata) HasCreatedBy() bool { - if o != nil && o.CreatedBy != nil { +// HasCreatedDate returns a boolean if a field has been set. +func (o *RequestMetadata) HasCreatedDate() bool { + if o != nil && o.CreatedDate != nil { return true } @@ -128,7 +128,7 @@ func (o *RequestMetadata) HasCreatedBy() bool { } // GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *RequestMetadata) GetEtag() *string { if o == nil { return nil @@ -166,7 +166,7 @@ func (o *RequestMetadata) HasEtag() bool { } // GetRequestStatus returns the RequestStatus field value -// If the value is explicit nil, the zero value for RequestStatus will be returned +// If the value is explicit nil, nil is returned func (o *RequestMetadata) GetRequestStatus() *RequestStatus { if o == nil { return nil @@ -205,18 +205,22 @@ func (o *RequestMetadata) HasRequestStatus() bool { func (o RequestMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.CreatedDate != nil { - toSerialize["createdDate"] = o.CreatedDate - } if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } + + if o.CreatedDate != nil { + toSerialize["createdDate"] = o.CreatedDate + } + if o.Etag != nil { toSerialize["etag"] = o.Etag } + if o.RequestStatus != nil { toSerialize["requestStatus"] = o.RequestStatus } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_properties.go index 94d040939709..e43b39d983b7 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_properties.go @@ -16,9 +16,9 @@ import ( // RequestProperties struct for RequestProperties type RequestProperties struct { - Method *string `json:"method,omitempty"` - Headers *map[string]string `json:"headers,omitempty"` Body *string `json:"body,omitempty"` + Headers *map[string]string `json:"headers,omitempty"` + Method *string `json:"method,omitempty"` Url *string `json:"url,omitempty"` } @@ -40,38 +40,38 @@ func NewRequestPropertiesWithDefaults() *RequestProperties { return &this } -// GetMethod returns the Method field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestProperties) GetMethod() *string { +// GetBody returns the Body field value +// If the value is explicit nil, nil is returned +func (o *RequestProperties) GetBody() *string { if o == nil { return nil } - return o.Method + return o.Body } -// GetMethodOk returns a tuple with the Method field value +// GetBodyOk returns a tuple with the Body field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestProperties) GetMethodOk() (*string, bool) { +func (o *RequestProperties) GetBodyOk() (*string, bool) { if o == nil { return nil, false } - return o.Method, true + return o.Body, true } -// SetMethod sets field value -func (o *RequestProperties) SetMethod(v string) { +// SetBody sets field value +func (o *RequestProperties) SetBody(v string) { - o.Method = &v + o.Body = &v } -// HasMethod returns a boolean if a field has been set. -func (o *RequestProperties) HasMethod() bool { - if o != nil && o.Method != nil { +// HasBody returns a boolean if a field has been set. +func (o *RequestProperties) HasBody() bool { + if o != nil && o.Body != nil { return true } @@ -79,7 +79,7 @@ func (o *RequestProperties) HasMethod() bool { } // GetHeaders returns the Headers field value -// If the value is explicit nil, the zero value for map[string]string will be returned +// If the value is explicit nil, nil is returned func (o *RequestProperties) GetHeaders() *map[string]string { if o == nil { return nil @@ -116,38 +116,38 @@ func (o *RequestProperties) HasHeaders() bool { return false } -// GetBody returns the Body field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestProperties) GetBody() *string { +// GetMethod returns the Method field value +// If the value is explicit nil, nil is returned +func (o *RequestProperties) GetMethod() *string { if o == nil { return nil } - return o.Body + return o.Method } -// GetBodyOk returns a tuple with the Body field value +// GetMethodOk returns a tuple with the Method field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestProperties) GetBodyOk() (*string, bool) { +func (o *RequestProperties) GetMethodOk() (*string, bool) { if o == nil { return nil, false } - return o.Body, true + return o.Method, true } -// SetBody sets field value -func (o *RequestProperties) SetBody(v string) { +// SetMethod sets field value +func (o *RequestProperties) SetMethod(v string) { - o.Body = &v + o.Method = &v } -// HasBody returns a boolean if a field has been set. -func (o *RequestProperties) HasBody() bool { - if o != nil && o.Body != nil { +// HasMethod returns a boolean if a field has been set. +func (o *RequestProperties) HasMethod() bool { + if o != nil && o.Method != nil { return true } @@ -155,7 +155,7 @@ func (o *RequestProperties) HasBody() bool { } // GetUrl returns the Url field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *RequestProperties) GetUrl() *string { if o == nil { return nil @@ -194,18 +194,22 @@ func (o *RequestProperties) HasUrl() bool { func (o RequestProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Method != nil { - toSerialize["method"] = o.Method + if o.Body != nil { + toSerialize["body"] = o.Body } + if o.Headers != nil { toSerialize["headers"] = o.Headers } - if o.Body != nil { - toSerialize["body"] = o.Body + + if o.Method != nil { + toSerialize["method"] = o.Method } + if o.Url != nil { toSerialize["url"] = o.Url } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status.go index e772df8e6404..f4ca3ceeffe2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status.go @@ -16,13 +16,13 @@ import ( // RequestStatus struct for RequestStatus type RequestStatus struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` + Metadata *RequestStatusMetadata `json:"metadata,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` - Metadata *RequestStatusMetadata `json:"metadata,omitempty"` } // NewRequestStatus instantiates a new RequestStatus object @@ -43,152 +43,152 @@ func NewRequestStatusWithDefaults() *RequestStatus { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestStatus) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *RequestStatus) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestStatus) GetIdOk() (*string, bool) { +func (o *RequestStatus) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *RequestStatus) SetId(v string) { +// SetHref sets field value +func (o *RequestStatus) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *RequestStatus) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *RequestStatus) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *RequestStatus) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *RequestStatus) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestStatus) GetTypeOk() (*Type, bool) { +func (o *RequestStatus) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *RequestStatus) SetType(v Type) { +// SetId sets field value +func (o *RequestStatus) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *RequestStatus) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *RequestStatus) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestStatus) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *RequestStatus) GetMetadata() *RequestStatusMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestStatus) GetHrefOk() (*string, bool) { +func (o *RequestStatus) GetMetadataOk() (*RequestStatusMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *RequestStatus) SetHref(v string) { +// SetMetadata sets field value +func (o *RequestStatus) SetMetadata(v RequestStatusMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *RequestStatus) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *RequestStatus) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for RequestStatusMetadata will be returned -func (o *RequestStatus) GetMetadata() *RequestStatusMetadata { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *RequestStatus) GetType() *Type { if o == nil { return nil } - return o.Metadata + return o.Type } -// GetMetadataOk returns a tuple with the Metadata field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestStatus) GetMetadataOk() (*RequestStatusMetadata, bool) { +func (o *RequestStatus) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Type, true } -// SetMetadata sets field value -func (o *RequestStatus) SetMetadata(v RequestStatusMetadata) { +// SetType sets field value +func (o *RequestStatus) SetType(v Type) { - o.Metadata = &v + o.Type = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *RequestStatus) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasType returns a boolean if a field has been set. +func (o *RequestStatus) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -197,18 +197,22 @@ func (o *RequestStatus) HasMetadata() bool { func (o RequestStatus) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status_metadata.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status_metadata.go index ef97dbedb13e..29b9967c8528 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status_metadata.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_status_metadata.go @@ -16,10 +16,10 @@ import ( // RequestStatusMetadata struct for RequestStatusMetadata type RequestStatusMetadata struct { - Status *string `json:"status,omitempty"` - Message *string `json:"message,omitempty"` // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` Targets *[]RequestTarget `json:"targets,omitempty"` } @@ -41,38 +41,38 @@ func NewRequestStatusMetadataWithDefaults() *RequestStatusMetadata { return &this } -// GetStatus returns the Status field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestStatusMetadata) GetStatus() *string { +// GetEtag returns the Etag field value +// If the value is explicit nil, nil is returned +func (o *RequestStatusMetadata) GetEtag() *string { if o == nil { return nil } - return o.Status + return o.Etag } -// GetStatusOk returns a tuple with the Status field value +// GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestStatusMetadata) GetStatusOk() (*string, bool) { +func (o *RequestStatusMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } - return o.Status, true + return o.Etag, true } -// SetStatus sets field value -func (o *RequestStatusMetadata) SetStatus(v string) { +// SetEtag sets field value +func (o *RequestStatusMetadata) SetEtag(v string) { - o.Status = &v + o.Etag = &v } -// HasStatus returns a boolean if a field has been set. -func (o *RequestStatusMetadata) HasStatus() bool { - if o != nil && o.Status != nil { +// HasEtag returns a boolean if a field has been set. +func (o *RequestStatusMetadata) HasEtag() bool { + if o != nil && o.Etag != nil { return true } @@ -80,7 +80,7 @@ func (o *RequestStatusMetadata) HasStatus() bool { } // GetMessage returns the Message field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *RequestStatusMetadata) GetMessage() *string { if o == nil { return nil @@ -117,38 +117,38 @@ func (o *RequestStatusMetadata) HasMessage() bool { return false } -// GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestStatusMetadata) GetEtag() *string { +// GetStatus returns the Status field value +// If the value is explicit nil, nil is returned +func (o *RequestStatusMetadata) GetStatus() *string { if o == nil { return nil } - return o.Etag + return o.Status } -// GetEtagOk returns a tuple with the Etag field value +// GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestStatusMetadata) GetEtagOk() (*string, bool) { +func (o *RequestStatusMetadata) GetStatusOk() (*string, bool) { if o == nil { return nil, false } - return o.Etag, true + return o.Status, true } -// SetEtag sets field value -func (o *RequestStatusMetadata) SetEtag(v string) { +// SetStatus sets field value +func (o *RequestStatusMetadata) SetStatus(v string) { - o.Etag = &v + o.Status = &v } -// HasEtag returns a boolean if a field has been set. -func (o *RequestStatusMetadata) HasEtag() bool { - if o != nil && o.Etag != nil { +// HasStatus returns a boolean if a field has been set. +func (o *RequestStatusMetadata) HasStatus() bool { + if o != nil && o.Status != nil { return true } @@ -156,7 +156,7 @@ func (o *RequestStatusMetadata) HasEtag() bool { } // GetTargets returns the Targets field value -// If the value is explicit nil, the zero value for []RequestTarget will be returned +// If the value is explicit nil, nil is returned func (o *RequestStatusMetadata) GetTargets() *[]RequestTarget { if o == nil { return nil @@ -195,18 +195,22 @@ func (o *RequestStatusMetadata) HasTargets() bool { func (o RequestStatusMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Status != nil { - toSerialize["status"] = o.Status + if o.Etag != nil { + toSerialize["etag"] = o.Etag } + if o.Message != nil { toSerialize["message"] = o.Message } - if o.Etag != nil { - toSerialize["etag"] = o.Etag + + if o.Status != nil { + toSerialize["status"] = o.Status } + if o.Targets != nil { toSerialize["targets"] = o.Targets } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_target.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_target.go index 590a5dfae8ae..dc56f80ab633 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_target.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_request_target.go @@ -16,8 +16,8 @@ import ( // RequestTarget struct for RequestTarget type RequestTarget struct { - Target *ResourceReference `json:"target,omitempty"` Status *string `json:"status,omitempty"` + Target *ResourceReference `json:"target,omitempty"` } // NewRequestTarget instantiates a new RequestTarget object @@ -38,76 +38,76 @@ func NewRequestTargetWithDefaults() *RequestTarget { return &this } -// GetTarget returns the Target field value -// If the value is explicit nil, the zero value for ResourceReference will be returned -func (o *RequestTarget) GetTarget() *ResourceReference { +// GetStatus returns the Status field value +// If the value is explicit nil, nil is returned +func (o *RequestTarget) GetStatus() *string { if o == nil { return nil } - return o.Target + return o.Status } -// GetTargetOk returns a tuple with the Target field value +// GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestTarget) GetTargetOk() (*ResourceReference, bool) { +func (o *RequestTarget) GetStatusOk() (*string, bool) { if o == nil { return nil, false } - return o.Target, true + return o.Status, true } -// SetTarget sets field value -func (o *RequestTarget) SetTarget(v ResourceReference) { +// SetStatus sets field value +func (o *RequestTarget) SetStatus(v string) { - o.Target = &v + o.Status = &v } -// HasTarget returns a boolean if a field has been set. -func (o *RequestTarget) HasTarget() bool { - if o != nil && o.Target != nil { +// HasStatus returns a boolean if a field has been set. +func (o *RequestTarget) HasStatus() bool { + if o != nil && o.Status != nil { return true } return false } -// GetStatus returns the Status field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RequestTarget) GetStatus() *string { +// GetTarget returns the Target field value +// If the value is explicit nil, nil is returned +func (o *RequestTarget) GetTarget() *ResourceReference { if o == nil { return nil } - return o.Status + return o.Target } -// GetStatusOk returns a tuple with the Status field value +// GetTargetOk returns a tuple with the Target field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RequestTarget) GetStatusOk() (*string, bool) { +func (o *RequestTarget) GetTargetOk() (*ResourceReference, bool) { if o == nil { return nil, false } - return o.Status, true + return o.Target, true } -// SetStatus sets field value -func (o *RequestTarget) SetStatus(v string) { +// SetTarget sets field value +func (o *RequestTarget) SetTarget(v ResourceReference) { - o.Status = &v + o.Target = &v } -// HasStatus returns a boolean if a field has been set. -func (o *RequestTarget) HasStatus() bool { - if o != nil && o.Status != nil { +// HasTarget returns a boolean if a field has been set. +func (o *RequestTarget) HasTarget() bool { + if o != nil && o.Target != nil { return true } @@ -116,12 +116,14 @@ func (o *RequestTarget) HasStatus() bool { func (o RequestTarget) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Target != nil { - toSerialize["target"] = o.Target - } if o.Status != nil { toSerialize["status"] = o.Status } + + if o.Target != nil { + toSerialize["target"] = o.Target + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_requests.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_requests.go index 3d67bdc81880..0bf44ade8280 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_requests.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_requests.go @@ -16,31 +16,31 @@ import ( // Requests struct for Requests type Requests struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Request `json:"items,omitempty"` + // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). + Limit *float32 `json:"limit"` // The offset, specified in the request (if not is specified, 0 is used by default). Offset *float32 `json:"offset"` - // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). - Limit *float32 `json:"limit"` - Links *PaginationLinks `json:"_links"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewRequests instantiates a new Requests 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 NewRequests(offset float32, limit float32, links PaginationLinks) *Requests { +func NewRequests(links PaginationLinks, limit float32, offset float32) *Requests { this := Requests{} - this.Offset = &offset - this.Limit = &limit this.Links = &links + this.Limit = &limit + this.Offset = &offset return &this } @@ -53,114 +53,114 @@ func NewRequestsWithDefaults() *Requests { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Requests) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Requests) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Requests) GetIdOk() (*string, bool) { +func (o *Requests) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Requests) SetId(v string) { +// SetLinks sets field value +func (o *Requests) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Requests) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Requests) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Requests) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Requests) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Requests) GetTypeOk() (*Type, bool) { +func (o *Requests) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Requests) SetType(v Type) { +// SetHref sets field value +func (o *Requests) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Requests) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Requests) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Requests) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Requests) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Requests) GetHrefOk() (*string, bool) { +func (o *Requests) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Requests) SetHref(v string) { +// SetId sets field value +func (o *Requests) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Requests) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Requests) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -168,7 +168,7 @@ func (o *Requests) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Request will be returned +// If the value is explicit nil, nil is returned func (o *Requests) GetItems() *[]Request { if o == nil { return nil @@ -205,114 +205,114 @@ func (o *Requests) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Requests) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Requests) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Requests) GetOffsetOk() (*float32, bool) { +func (o *Requests) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Requests) SetOffset(v float32) { +// SetLimit sets field value +func (o *Requests) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Requests) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Requests) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Requests) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Requests) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Requests) GetLimitOk() (*float32, bool) { +func (o *Requests) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Requests) SetLimit(v float32) { +// SetOffset sets field value +func (o *Requests) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Requests) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Requests) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Requests) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Requests) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Requests) GetLinksOk() (*PaginationLinks, bool) { +func (o *Requests) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Requests) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Requests) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Requests) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Requests) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -321,27 +321,34 @@ func (o *Requests) HasLinks() bool { func (o Requests) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource.go index 1d370ce223e3..82b8f739d8f1 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource.go @@ -16,15 +16,15 @@ import ( // Resource datacenter resource representation type Resource struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` + Entities *ResourceEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ResourceProperties `json:"properties,omitempty"` - Entities *ResourceEntities `json:"entities,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewResource instantiates a new Resource object @@ -45,114 +45,114 @@ func NewResourceWithDefaults() *Resource { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Resource) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Resource) GetEntities() *ResourceEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resource) GetIdOk() (*string, bool) { +func (o *Resource) GetEntitiesOk() (*ResourceEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Resource) SetId(v string) { +// SetEntities sets field value +func (o *Resource) SetEntities(v ResourceEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Resource) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Resource) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Resource) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Resource) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resource) GetTypeOk() (*Type, bool) { +func (o *Resource) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Resource) SetType(v Type) { +// SetHref sets field value +func (o *Resource) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Resource) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Resource) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Resource) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Resource) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resource) GetHrefOk() (*string, bool) { +func (o *Resource) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Resource) SetHref(v string) { +// SetId sets field value +func (o *Resource) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Resource) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Resource) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -160,7 +160,7 @@ func (o *Resource) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *Resource) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -198,7 +198,7 @@ func (o *Resource) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ResourceProperties will be returned +// If the value is explicit nil, nil is returned func (o *Resource) GetProperties() *ResourceProperties { if o == nil { return nil @@ -235,38 +235,38 @@ func (o *Resource) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for ResourceEntities will be returned -func (o *Resource) GetEntities() *ResourceEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Resource) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resource) GetEntitiesOk() (*ResourceEntities, bool) { +func (o *Resource) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Resource) SetEntities(v ResourceEntities) { +// SetType sets field value +func (o *Resource) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Resource) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Resource) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -275,24 +275,30 @@ func (o *Resource) HasEntities() bool { func (o Resource) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_entities.go index cc9f26acb020..735ffe73b17c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_entities.go @@ -38,7 +38,7 @@ func NewResourceEntitiesWithDefaults() *ResourceEntities { } // GetGroups returns the Groups field value -// If the value is explicit nil, the zero value for ResourceGroups will be returned +// If the value is explicit nil, nil is returned func (o *ResourceEntities) GetGroups() *ResourceGroups { if o == nil { return nil @@ -80,6 +80,7 @@ func (o ResourceEntities) MarshalJSON() ([]byte, error) { if o.Groups != nil { toSerialize["groups"] = o.Groups } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_groups.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_groups.go index ae8939261cf3..8d0a2a1a6a0c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_groups.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_groups.go @@ -16,14 +16,14 @@ import ( // ResourceGroups Resources assigned to this group. type ResourceGroups struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Resource `json:"items,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewResourceGroups instantiates a new ResourceGroups object @@ -44,152 +44,152 @@ func NewResourceGroupsWithDefaults() *ResourceGroups { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ResourceGroups) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ResourceGroups) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceGroups) GetIdOk() (*string, bool) { +func (o *ResourceGroups) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *ResourceGroups) SetId(v string) { +// SetHref sets field value +func (o *ResourceGroups) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *ResourceGroups) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *ResourceGroups) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ResourceGroups) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ResourceGroups) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceGroups) GetTypeOk() (*Type, bool) { +func (o *ResourceGroups) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *ResourceGroups) SetType(v Type) { +// SetId sets field value +func (o *ResourceGroups) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *ResourceGroups) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *ResourceGroups) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ResourceGroups) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *ResourceGroups) GetItems() *[]Resource { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceGroups) GetHrefOk() (*string, bool) { +func (o *ResourceGroups) GetItemsOk() (*[]Resource, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *ResourceGroups) SetHref(v string) { +// SetItems sets field value +func (o *ResourceGroups) SetItems(v []Resource) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *ResourceGroups) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *ResourceGroups) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Resource will be returned -func (o *ResourceGroups) GetItems() *[]Resource { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ResourceGroups) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceGroups) GetItemsOk() (*[]Resource, bool) { +func (o *ResourceGroups) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *ResourceGroups) SetItems(v []Resource) { +// SetType sets field value +func (o *ResourceGroups) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *ResourceGroups) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *ResourceGroups) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *ResourceGroups) HasItems() bool { func (o ResourceGroups) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_limits.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_limits.go index 4acc2299887c..ca9ee8400570 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_limits.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_limits.go @@ -16,81 +16,81 @@ import ( // ResourceLimits struct for ResourceLimits type ResourceLimits struct { - // The maximum number of cores per server. - CoresPerServer *int32 `json:"coresPerServer"` - // The maximum number of cores per contract. + // The maximum number of CPU cores per contract. CoresPerContract *int32 `json:"coresPerContract"` - // The number of cores provisioned. + // The maximum number of CPU cores per server. + CoresPerServer *int32 `json:"coresPerServer"` + // The number of CPU cores provisioned. CoresProvisioned *int32 `json:"coresProvisioned"` - // The maximum RAM per server. - RamPerServer *int32 `json:"ramPerServer"` - // The maximum RAM per contract. - RamPerContract *int32 `json:"ramPerContract"` - // RAM provisioned. - RamProvisioned *int32 `json:"ramProvisioned"` - // HDD limit per volume. - HddLimitPerVolume *int64 `json:"hddLimitPerVolume"` - // HDD limit per contract. + // The amount of DAS disk space (in MB) in a Cube server that is currently provisioned. + DasVolumeProvisioned *int64 `json:"dasVolumeProvisioned"` + // The maximum amount of disk space (in MB) that can be provided under this contract. HddLimitPerContract *int64 `json:"hddLimitPerContract"` - // HDD volume provisioned. + // The maximum size (in MB) of an idividual hard disk volume. + HddLimitPerVolume *int64 `json:"hddLimitPerVolume"` + // The amount of hard disk space (in MB) that is currently provisioned. HddVolumeProvisioned *int64 `json:"hddVolumeProvisioned"` - // SSD limit per volume. - SsdLimitPerVolume *int64 `json:"ssdLimitPerVolume"` - // SSD limit per contract. - SsdLimitPerContract *int64 `json:"ssdLimitPerContract"` - // SSD volume provisioned. - SsdVolumeProvisioned *int64 `json:"ssdVolumeProvisioned"` - // DAS (Direct Attached Storage) volume provisioned. - DasVolumeProvisioned *int64 `json:"dasVolumeProvisioned"` - // Total reservable IP limit for the customer. - ReservableIps *int32 `json:"reservableIps"` - // Reserved ips for the contract. - ReservedIpsOnContract *int32 `json:"reservedIpsOnContract"` - // Reserved ips in use. - ReservedIpsInUse *int32 `json:"reservedIpsInUse"` - // K8s clusters total limit. + // The maximum number of Kubernetes clusters that can be created under this contract. K8sClusterLimitTotal *int32 `json:"k8sClusterLimitTotal"` - // K8s clusters provisioned. + // The amount of Kubernetes clusters that is currently provisioned. K8sClustersProvisioned *int32 `json:"k8sClustersProvisioned"` - // NLB total limit. - NlbLimitTotal *int32 `json:"nlbLimitTotal"` - // NLBs provisioned. - NlbProvisioned *int32 `json:"nlbProvisioned"` - // NAT Gateway total limit. + // The NAT Gateway total limit. NatGatewayLimitTotal *int32 `json:"natGatewayLimitTotal"` - // NAT Gateways provisioned. + // The NAT Gateways provisioned. NatGatewayProvisioned *int32 `json:"natGatewayProvisioned"` + // The NLB total limit. + NlbLimitTotal *int32 `json:"nlbLimitTotal"` + // The NLBs provisioned. + NlbProvisioned *int32 `json:"nlbProvisioned"` + // The maximum amount of RAM (in MB) that can be provisioned under this contract. + RamPerContract *int32 `json:"ramPerContract"` + // The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract. + RamPerServer *int32 `json:"ramPerServer"` + // The amount of RAM (in MB) provisioned under this contract. + RamProvisioned *int32 `json:"ramProvisioned"` + // The maximum number of static public IP addresses that can be reserved by this customer across contracts. + ReservableIps *int32 `json:"reservableIps"` + // The number of static public IP addresses in use. + ReservedIpsInUse *int32 `json:"reservedIpsInUse"` + // The maximum number of static public IP addresses that can be reserved for this contract. + ReservedIpsOnContract *int32 `json:"reservedIpsOnContract"` + // The maximum amount of solid state disk space (in MB) that can be provisioned under this contract. + SsdLimitPerContract *int64 `json:"ssdLimitPerContract"` + // The maximum size (in MB) of an individual solid state disk volume. + SsdLimitPerVolume *int64 `json:"ssdLimitPerVolume"` + // The amount of solid state disk space (in MB) that is currently provisioned. + SsdVolumeProvisioned *int64 `json:"ssdVolumeProvisioned"` } // NewResourceLimits instantiates a new ResourceLimits 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 NewResourceLimits(coresPerServer int32, coresPerContract int32, coresProvisioned int32, ramPerServer int32, ramPerContract int32, ramProvisioned int32, hddLimitPerVolume int64, hddLimitPerContract int64, hddVolumeProvisioned int64, ssdLimitPerVolume int64, ssdLimitPerContract int64, ssdVolumeProvisioned int64, dasVolumeProvisioned int64, reservableIps int32, reservedIpsOnContract int32, reservedIpsInUse int32, k8sClusterLimitTotal int32, k8sClustersProvisioned int32, nlbLimitTotal int32, nlbProvisioned int32, natGatewayLimitTotal int32, natGatewayProvisioned int32) *ResourceLimits { +func NewResourceLimits(coresPerContract int32, coresPerServer int32, coresProvisioned int32, dasVolumeProvisioned int64, hddLimitPerContract int64, hddLimitPerVolume int64, hddVolumeProvisioned int64, k8sClusterLimitTotal int32, k8sClustersProvisioned int32, natGatewayLimitTotal int32, natGatewayProvisioned int32, nlbLimitTotal int32, nlbProvisioned int32, ramPerContract int32, ramPerServer int32, ramProvisioned int32, reservableIps int32, reservedIpsInUse int32, reservedIpsOnContract int32, ssdLimitPerContract int64, ssdLimitPerVolume int64, ssdVolumeProvisioned int64) *ResourceLimits { this := ResourceLimits{} - this.CoresPerServer = &coresPerServer this.CoresPerContract = &coresPerContract + this.CoresPerServer = &coresPerServer this.CoresProvisioned = &coresProvisioned - this.RamPerServer = &ramPerServer - this.RamPerContract = &ramPerContract - this.RamProvisioned = &ramProvisioned - this.HddLimitPerVolume = &hddLimitPerVolume + this.DasVolumeProvisioned = &dasVolumeProvisioned this.HddLimitPerContract = &hddLimitPerContract + this.HddLimitPerVolume = &hddLimitPerVolume this.HddVolumeProvisioned = &hddVolumeProvisioned - this.SsdLimitPerVolume = &ssdLimitPerVolume - this.SsdLimitPerContract = &ssdLimitPerContract - this.SsdVolumeProvisioned = &ssdVolumeProvisioned - this.DasVolumeProvisioned = &dasVolumeProvisioned - this.ReservableIps = &reservableIps - this.ReservedIpsOnContract = &reservedIpsOnContract - this.ReservedIpsInUse = &reservedIpsInUse this.K8sClusterLimitTotal = &k8sClusterLimitTotal this.K8sClustersProvisioned = &k8sClustersProvisioned - this.NlbLimitTotal = &nlbLimitTotal - this.NlbProvisioned = &nlbProvisioned this.NatGatewayLimitTotal = &natGatewayLimitTotal this.NatGatewayProvisioned = &natGatewayProvisioned + this.NlbLimitTotal = &nlbLimitTotal + this.NlbProvisioned = &nlbProvisioned + this.RamPerContract = &ramPerContract + this.RamPerServer = &ramPerServer + this.RamProvisioned = &ramProvisioned + this.ReservableIps = &reservableIps + this.ReservedIpsInUse = &reservedIpsInUse + this.ReservedIpsOnContract = &reservedIpsOnContract + this.SsdLimitPerContract = &ssdLimitPerContract + this.SsdLimitPerVolume = &ssdLimitPerVolume + this.SsdVolumeProvisioned = &ssdVolumeProvisioned return &this } @@ -103,76 +103,76 @@ func NewResourceLimitsWithDefaults() *ResourceLimits { return &this } -// GetCoresPerServer returns the CoresPerServer field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetCoresPerServer() *int32 { +// GetCoresPerContract returns the CoresPerContract field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetCoresPerContract() *int32 { if o == nil { return nil } - return o.CoresPerServer + return o.CoresPerContract } -// GetCoresPerServerOk returns a tuple with the CoresPerServer field value +// GetCoresPerContractOk returns a tuple with the CoresPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetCoresPerServerOk() (*int32, bool) { +func (o *ResourceLimits) GetCoresPerContractOk() (*int32, bool) { if o == nil { return nil, false } - return o.CoresPerServer, true + return o.CoresPerContract, true } -// SetCoresPerServer sets field value -func (o *ResourceLimits) SetCoresPerServer(v int32) { +// SetCoresPerContract sets field value +func (o *ResourceLimits) SetCoresPerContract(v int32) { - o.CoresPerServer = &v + o.CoresPerContract = &v } -// HasCoresPerServer returns a boolean if a field has been set. -func (o *ResourceLimits) HasCoresPerServer() bool { - if o != nil && o.CoresPerServer != nil { +// HasCoresPerContract returns a boolean if a field has been set. +func (o *ResourceLimits) HasCoresPerContract() bool { + if o != nil && o.CoresPerContract != nil { return true } return false } -// GetCoresPerContract returns the CoresPerContract field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetCoresPerContract() *int32 { +// GetCoresPerServer returns the CoresPerServer field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetCoresPerServer() *int32 { if o == nil { return nil } - return o.CoresPerContract + return o.CoresPerServer } -// GetCoresPerContractOk returns a tuple with the CoresPerContract field value +// GetCoresPerServerOk returns a tuple with the CoresPerServer field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetCoresPerContractOk() (*int32, bool) { +func (o *ResourceLimits) GetCoresPerServerOk() (*int32, bool) { if o == nil { return nil, false } - return o.CoresPerContract, true + return o.CoresPerServer, true } -// SetCoresPerContract sets field value -func (o *ResourceLimits) SetCoresPerContract(v int32) { +// SetCoresPerServer sets field value +func (o *ResourceLimits) SetCoresPerServer(v int32) { - o.CoresPerContract = &v + o.CoresPerServer = &v } -// HasCoresPerContract returns a boolean if a field has been set. -func (o *ResourceLimits) HasCoresPerContract() bool { - if o != nil && o.CoresPerContract != nil { +// HasCoresPerServer returns a boolean if a field has been set. +func (o *ResourceLimits) HasCoresPerServer() bool { + if o != nil && o.CoresPerServer != nil { return true } @@ -180,7 +180,7 @@ func (o *ResourceLimits) HasCoresPerContract() bool { } // GetCoresProvisioned returns the CoresProvisioned field value -// If the value is explicit nil, the zero value for int32 will be returned +// If the value is explicit nil, nil is returned func (o *ResourceLimits) GetCoresProvisioned() *int32 { if o == nil { return nil @@ -217,722 +217,722 @@ func (o *ResourceLimits) HasCoresProvisioned() bool { return false } -// GetRamPerServer returns the RamPerServer field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetRamPerServer() *int32 { +// GetDasVolumeProvisioned returns the DasVolumeProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetDasVolumeProvisioned() *int64 { if o == nil { return nil } - return o.RamPerServer + return o.DasVolumeProvisioned } -// GetRamPerServerOk returns a tuple with the RamPerServer field value +// GetDasVolumeProvisionedOk returns a tuple with the DasVolumeProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetRamPerServerOk() (*int32, bool) { +func (o *ResourceLimits) GetDasVolumeProvisionedOk() (*int64, bool) { if o == nil { return nil, false } - return o.RamPerServer, true + return o.DasVolumeProvisioned, true } -// SetRamPerServer sets field value -func (o *ResourceLimits) SetRamPerServer(v int32) { +// SetDasVolumeProvisioned sets field value +func (o *ResourceLimits) SetDasVolumeProvisioned(v int64) { - o.RamPerServer = &v + o.DasVolumeProvisioned = &v } -// HasRamPerServer returns a boolean if a field has been set. -func (o *ResourceLimits) HasRamPerServer() bool { - if o != nil && o.RamPerServer != nil { +// HasDasVolumeProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasDasVolumeProvisioned() bool { + if o != nil && o.DasVolumeProvisioned != nil { return true } return false } -// GetRamPerContract returns the RamPerContract field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetRamPerContract() *int32 { +// GetHddLimitPerContract returns the HddLimitPerContract field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetHddLimitPerContract() *int64 { if o == nil { return nil } - return o.RamPerContract + return o.HddLimitPerContract } -// GetRamPerContractOk returns a tuple with the RamPerContract field value +// GetHddLimitPerContractOk returns a tuple with the HddLimitPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetRamPerContractOk() (*int32, bool) { +func (o *ResourceLimits) GetHddLimitPerContractOk() (*int64, bool) { if o == nil { return nil, false } - return o.RamPerContract, true + return o.HddLimitPerContract, true } -// SetRamPerContract sets field value -func (o *ResourceLimits) SetRamPerContract(v int32) { +// SetHddLimitPerContract sets field value +func (o *ResourceLimits) SetHddLimitPerContract(v int64) { - o.RamPerContract = &v + o.HddLimitPerContract = &v } -// HasRamPerContract returns a boolean if a field has been set. -func (o *ResourceLimits) HasRamPerContract() bool { - if o != nil && o.RamPerContract != nil { +// HasHddLimitPerContract returns a boolean if a field has been set. +func (o *ResourceLimits) HasHddLimitPerContract() bool { + if o != nil && o.HddLimitPerContract != nil { return true } return false } -// GetRamProvisioned returns the RamProvisioned field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetRamProvisioned() *int32 { +// GetHddLimitPerVolume returns the HddLimitPerVolume field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetHddLimitPerVolume() *int64 { if o == nil { return nil } - return o.RamProvisioned + return o.HddLimitPerVolume } -// GetRamProvisionedOk returns a tuple with the RamProvisioned field value +// GetHddLimitPerVolumeOk returns a tuple with the HddLimitPerVolume field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetRamProvisionedOk() (*int32, bool) { +func (o *ResourceLimits) GetHddLimitPerVolumeOk() (*int64, bool) { if o == nil { return nil, false } - return o.RamProvisioned, true + return o.HddLimitPerVolume, true } -// SetRamProvisioned sets field value -func (o *ResourceLimits) SetRamProvisioned(v int32) { +// SetHddLimitPerVolume sets field value +func (o *ResourceLimits) SetHddLimitPerVolume(v int64) { - o.RamProvisioned = &v + o.HddLimitPerVolume = &v } -// HasRamProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasRamProvisioned() bool { - if o != nil && o.RamProvisioned != nil { +// HasHddLimitPerVolume returns a boolean if a field has been set. +func (o *ResourceLimits) HasHddLimitPerVolume() bool { + if o != nil && o.HddLimitPerVolume != nil { return true } return false } -// GetHddLimitPerVolume returns the HddLimitPerVolume field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetHddLimitPerVolume() *int64 { +// GetHddVolumeProvisioned returns the HddVolumeProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetHddVolumeProvisioned() *int64 { if o == nil { return nil } - return o.HddLimitPerVolume + return o.HddVolumeProvisioned } -// GetHddLimitPerVolumeOk returns a tuple with the HddLimitPerVolume field value +// GetHddVolumeProvisionedOk returns a tuple with the HddVolumeProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetHddLimitPerVolumeOk() (*int64, bool) { +func (o *ResourceLimits) GetHddVolumeProvisionedOk() (*int64, bool) { if o == nil { return nil, false } - return o.HddLimitPerVolume, true + return o.HddVolumeProvisioned, true } -// SetHddLimitPerVolume sets field value -func (o *ResourceLimits) SetHddLimitPerVolume(v int64) { +// SetHddVolumeProvisioned sets field value +func (o *ResourceLimits) SetHddVolumeProvisioned(v int64) { - o.HddLimitPerVolume = &v + o.HddVolumeProvisioned = &v } -// HasHddLimitPerVolume returns a boolean if a field has been set. -func (o *ResourceLimits) HasHddLimitPerVolume() bool { - if o != nil && o.HddLimitPerVolume != nil { +// HasHddVolumeProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasHddVolumeProvisioned() bool { + if o != nil && o.HddVolumeProvisioned != nil { return true } return false } -// GetHddLimitPerContract returns the HddLimitPerContract field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetHddLimitPerContract() *int64 { +// GetK8sClusterLimitTotal returns the K8sClusterLimitTotal field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetK8sClusterLimitTotal() *int32 { if o == nil { return nil } - return o.HddLimitPerContract + return o.K8sClusterLimitTotal } -// GetHddLimitPerContractOk returns a tuple with the HddLimitPerContract field value +// GetK8sClusterLimitTotalOk returns a tuple with the K8sClusterLimitTotal field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetHddLimitPerContractOk() (*int64, bool) { +func (o *ResourceLimits) GetK8sClusterLimitTotalOk() (*int32, bool) { if o == nil { return nil, false } - return o.HddLimitPerContract, true + return o.K8sClusterLimitTotal, true } -// SetHddLimitPerContract sets field value -func (o *ResourceLimits) SetHddLimitPerContract(v int64) { +// SetK8sClusterLimitTotal sets field value +func (o *ResourceLimits) SetK8sClusterLimitTotal(v int32) { - o.HddLimitPerContract = &v + o.K8sClusterLimitTotal = &v } -// HasHddLimitPerContract returns a boolean if a field has been set. -func (o *ResourceLimits) HasHddLimitPerContract() bool { - if o != nil && o.HddLimitPerContract != nil { +// HasK8sClusterLimitTotal returns a boolean if a field has been set. +func (o *ResourceLimits) HasK8sClusterLimitTotal() bool { + if o != nil && o.K8sClusterLimitTotal != nil { return true } return false } -// GetHddVolumeProvisioned returns the HddVolumeProvisioned field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetHddVolumeProvisioned() *int64 { +// GetK8sClustersProvisioned returns the K8sClustersProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetK8sClustersProvisioned() *int32 { if o == nil { return nil } - return o.HddVolumeProvisioned + return o.K8sClustersProvisioned } -// GetHddVolumeProvisionedOk returns a tuple with the HddVolumeProvisioned field value +// GetK8sClustersProvisionedOk returns a tuple with the K8sClustersProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetHddVolumeProvisionedOk() (*int64, bool) { +func (o *ResourceLimits) GetK8sClustersProvisionedOk() (*int32, bool) { if o == nil { return nil, false } - return o.HddVolumeProvisioned, true + return o.K8sClustersProvisioned, true } -// SetHddVolumeProvisioned sets field value -func (o *ResourceLimits) SetHddVolumeProvisioned(v int64) { +// SetK8sClustersProvisioned sets field value +func (o *ResourceLimits) SetK8sClustersProvisioned(v int32) { - o.HddVolumeProvisioned = &v + o.K8sClustersProvisioned = &v } -// HasHddVolumeProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasHddVolumeProvisioned() bool { - if o != nil && o.HddVolumeProvisioned != nil { +// HasK8sClustersProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasK8sClustersProvisioned() bool { + if o != nil && o.K8sClustersProvisioned != nil { return true } return false } -// GetSsdLimitPerVolume returns the SsdLimitPerVolume field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetSsdLimitPerVolume() *int64 { +// GetNatGatewayLimitTotal returns the NatGatewayLimitTotal field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetNatGatewayLimitTotal() *int32 { if o == nil { return nil } - return o.SsdLimitPerVolume + return o.NatGatewayLimitTotal } -// GetSsdLimitPerVolumeOk returns a tuple with the SsdLimitPerVolume field value +// GetNatGatewayLimitTotalOk returns a tuple with the NatGatewayLimitTotal field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetSsdLimitPerVolumeOk() (*int64, bool) { +func (o *ResourceLimits) GetNatGatewayLimitTotalOk() (*int32, bool) { if o == nil { return nil, false } - return o.SsdLimitPerVolume, true + return o.NatGatewayLimitTotal, true } -// SetSsdLimitPerVolume sets field value -func (o *ResourceLimits) SetSsdLimitPerVolume(v int64) { +// SetNatGatewayLimitTotal sets field value +func (o *ResourceLimits) SetNatGatewayLimitTotal(v int32) { - o.SsdLimitPerVolume = &v + o.NatGatewayLimitTotal = &v } -// HasSsdLimitPerVolume returns a boolean if a field has been set. -func (o *ResourceLimits) HasSsdLimitPerVolume() bool { - if o != nil && o.SsdLimitPerVolume != nil { +// HasNatGatewayLimitTotal returns a boolean if a field has been set. +func (o *ResourceLimits) HasNatGatewayLimitTotal() bool { + if o != nil && o.NatGatewayLimitTotal != nil { return true } return false } -// GetSsdLimitPerContract returns the SsdLimitPerContract field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetSsdLimitPerContract() *int64 { +// GetNatGatewayProvisioned returns the NatGatewayProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetNatGatewayProvisioned() *int32 { if o == nil { return nil } - return o.SsdLimitPerContract + return o.NatGatewayProvisioned } -// GetSsdLimitPerContractOk returns a tuple with the SsdLimitPerContract field value +// GetNatGatewayProvisionedOk returns a tuple with the NatGatewayProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetSsdLimitPerContractOk() (*int64, bool) { +func (o *ResourceLimits) GetNatGatewayProvisionedOk() (*int32, bool) { if o == nil { return nil, false } - return o.SsdLimitPerContract, true + return o.NatGatewayProvisioned, true } -// SetSsdLimitPerContract sets field value -func (o *ResourceLimits) SetSsdLimitPerContract(v int64) { +// SetNatGatewayProvisioned sets field value +func (o *ResourceLimits) SetNatGatewayProvisioned(v int32) { - o.SsdLimitPerContract = &v + o.NatGatewayProvisioned = &v } -// HasSsdLimitPerContract returns a boolean if a field has been set. -func (o *ResourceLimits) HasSsdLimitPerContract() bool { - if o != nil && o.SsdLimitPerContract != nil { +// HasNatGatewayProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasNatGatewayProvisioned() bool { + if o != nil && o.NatGatewayProvisioned != nil { return true } return false } -// GetSsdVolumeProvisioned returns the SsdVolumeProvisioned field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetSsdVolumeProvisioned() *int64 { +// GetNlbLimitTotal returns the NlbLimitTotal field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetNlbLimitTotal() *int32 { if o == nil { return nil } - return o.SsdVolumeProvisioned + return o.NlbLimitTotal } -// GetSsdVolumeProvisionedOk returns a tuple with the SsdVolumeProvisioned field value +// GetNlbLimitTotalOk returns a tuple with the NlbLimitTotal field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetSsdVolumeProvisionedOk() (*int64, bool) { +func (o *ResourceLimits) GetNlbLimitTotalOk() (*int32, bool) { if o == nil { return nil, false } - return o.SsdVolumeProvisioned, true + return o.NlbLimitTotal, true } -// SetSsdVolumeProvisioned sets field value -func (o *ResourceLimits) SetSsdVolumeProvisioned(v int64) { +// SetNlbLimitTotal sets field value +func (o *ResourceLimits) SetNlbLimitTotal(v int32) { - o.SsdVolumeProvisioned = &v + o.NlbLimitTotal = &v } -// HasSsdVolumeProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasSsdVolumeProvisioned() bool { - if o != nil && o.SsdVolumeProvisioned != nil { +// HasNlbLimitTotal returns a boolean if a field has been set. +func (o *ResourceLimits) HasNlbLimitTotal() bool { + if o != nil && o.NlbLimitTotal != nil { return true } return false } -// GetDasVolumeProvisioned returns the DasVolumeProvisioned field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *ResourceLimits) GetDasVolumeProvisioned() *int64 { +// GetNlbProvisioned returns the NlbProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetNlbProvisioned() *int32 { if o == nil { return nil } - return o.DasVolumeProvisioned + return o.NlbProvisioned } -// GetDasVolumeProvisionedOk returns a tuple with the DasVolumeProvisioned field value +// GetNlbProvisionedOk returns a tuple with the NlbProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetDasVolumeProvisionedOk() (*int64, bool) { +func (o *ResourceLimits) GetNlbProvisionedOk() (*int32, bool) { if o == nil { return nil, false } - return o.DasVolumeProvisioned, true + return o.NlbProvisioned, true } -// SetDasVolumeProvisioned sets field value -func (o *ResourceLimits) SetDasVolumeProvisioned(v int64) { +// SetNlbProvisioned sets field value +func (o *ResourceLimits) SetNlbProvisioned(v int32) { - o.DasVolumeProvisioned = &v + o.NlbProvisioned = &v } -// HasDasVolumeProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasDasVolumeProvisioned() bool { - if o != nil && o.DasVolumeProvisioned != nil { +// HasNlbProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasNlbProvisioned() bool { + if o != nil && o.NlbProvisioned != nil { return true } return false } -// GetReservableIps returns the ReservableIps field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetReservableIps() *int32 { +// GetRamPerContract returns the RamPerContract field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetRamPerContract() *int32 { if o == nil { return nil } - return o.ReservableIps + return o.RamPerContract } -// GetReservableIpsOk returns a tuple with the ReservableIps field value +// GetRamPerContractOk returns a tuple with the RamPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetReservableIpsOk() (*int32, bool) { +func (o *ResourceLimits) GetRamPerContractOk() (*int32, bool) { if o == nil { return nil, false } - return o.ReservableIps, true + return o.RamPerContract, true } -// SetReservableIps sets field value -func (o *ResourceLimits) SetReservableIps(v int32) { +// SetRamPerContract sets field value +func (o *ResourceLimits) SetRamPerContract(v int32) { - o.ReservableIps = &v + o.RamPerContract = &v } -// HasReservableIps returns a boolean if a field has been set. -func (o *ResourceLimits) HasReservableIps() bool { - if o != nil && o.ReservableIps != nil { +// HasRamPerContract returns a boolean if a field has been set. +func (o *ResourceLimits) HasRamPerContract() bool { + if o != nil && o.RamPerContract != nil { return true } return false } -// GetReservedIpsOnContract returns the ReservedIpsOnContract field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetReservedIpsOnContract() *int32 { +// GetRamPerServer returns the RamPerServer field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetRamPerServer() *int32 { if o == nil { return nil } - return o.ReservedIpsOnContract + return o.RamPerServer } -// GetReservedIpsOnContractOk returns a tuple with the ReservedIpsOnContract field value +// GetRamPerServerOk returns a tuple with the RamPerServer field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetReservedIpsOnContractOk() (*int32, bool) { +func (o *ResourceLimits) GetRamPerServerOk() (*int32, bool) { if o == nil { return nil, false } - return o.ReservedIpsOnContract, true + return o.RamPerServer, true } -// SetReservedIpsOnContract sets field value -func (o *ResourceLimits) SetReservedIpsOnContract(v int32) { +// SetRamPerServer sets field value +func (o *ResourceLimits) SetRamPerServer(v int32) { - o.ReservedIpsOnContract = &v + o.RamPerServer = &v } -// HasReservedIpsOnContract returns a boolean if a field has been set. -func (o *ResourceLimits) HasReservedIpsOnContract() bool { - if o != nil && o.ReservedIpsOnContract != nil { +// HasRamPerServer returns a boolean if a field has been set. +func (o *ResourceLimits) HasRamPerServer() bool { + if o != nil && o.RamPerServer != nil { return true } return false } -// GetReservedIpsInUse returns the ReservedIpsInUse field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetReservedIpsInUse() *int32 { +// GetRamProvisioned returns the RamProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetRamProvisioned() *int32 { if o == nil { return nil } - return o.ReservedIpsInUse + return o.RamProvisioned } -// GetReservedIpsInUseOk returns a tuple with the ReservedIpsInUse field value +// GetRamProvisionedOk returns a tuple with the RamProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetReservedIpsInUseOk() (*int32, bool) { +func (o *ResourceLimits) GetRamProvisionedOk() (*int32, bool) { if o == nil { return nil, false } - return o.ReservedIpsInUse, true + return o.RamProvisioned, true } -// SetReservedIpsInUse sets field value -func (o *ResourceLimits) SetReservedIpsInUse(v int32) { +// SetRamProvisioned sets field value +func (o *ResourceLimits) SetRamProvisioned(v int32) { - o.ReservedIpsInUse = &v + o.RamProvisioned = &v } -// HasReservedIpsInUse returns a boolean if a field has been set. -func (o *ResourceLimits) HasReservedIpsInUse() bool { - if o != nil && o.ReservedIpsInUse != nil { +// HasRamProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasRamProvisioned() bool { + if o != nil && o.RamProvisioned != nil { return true } return false } -// GetK8sClusterLimitTotal returns the K8sClusterLimitTotal field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetK8sClusterLimitTotal() *int32 { +// GetReservableIps returns the ReservableIps field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetReservableIps() *int32 { if o == nil { return nil } - return o.K8sClusterLimitTotal + return o.ReservableIps } -// GetK8sClusterLimitTotalOk returns a tuple with the K8sClusterLimitTotal field value +// GetReservableIpsOk returns a tuple with the ReservableIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetK8sClusterLimitTotalOk() (*int32, bool) { +func (o *ResourceLimits) GetReservableIpsOk() (*int32, bool) { if o == nil { return nil, false } - return o.K8sClusterLimitTotal, true + return o.ReservableIps, true } -// SetK8sClusterLimitTotal sets field value -func (o *ResourceLimits) SetK8sClusterLimitTotal(v int32) { +// SetReservableIps sets field value +func (o *ResourceLimits) SetReservableIps(v int32) { - o.K8sClusterLimitTotal = &v + o.ReservableIps = &v } -// HasK8sClusterLimitTotal returns a boolean if a field has been set. -func (o *ResourceLimits) HasK8sClusterLimitTotal() bool { - if o != nil && o.K8sClusterLimitTotal != nil { +// HasReservableIps returns a boolean if a field has been set. +func (o *ResourceLimits) HasReservableIps() bool { + if o != nil && o.ReservableIps != nil { return true } return false } -// GetK8sClustersProvisioned returns the K8sClustersProvisioned field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetK8sClustersProvisioned() *int32 { +// GetReservedIpsInUse returns the ReservedIpsInUse field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetReservedIpsInUse() *int32 { if o == nil { return nil } - return o.K8sClustersProvisioned + return o.ReservedIpsInUse } -// GetK8sClustersProvisionedOk returns a tuple with the K8sClustersProvisioned field value +// GetReservedIpsInUseOk returns a tuple with the ReservedIpsInUse field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetK8sClustersProvisionedOk() (*int32, bool) { +func (o *ResourceLimits) GetReservedIpsInUseOk() (*int32, bool) { if o == nil { return nil, false } - return o.K8sClustersProvisioned, true + return o.ReservedIpsInUse, true } -// SetK8sClustersProvisioned sets field value -func (o *ResourceLimits) SetK8sClustersProvisioned(v int32) { +// SetReservedIpsInUse sets field value +func (o *ResourceLimits) SetReservedIpsInUse(v int32) { - o.K8sClustersProvisioned = &v + o.ReservedIpsInUse = &v } -// HasK8sClustersProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasK8sClustersProvisioned() bool { - if o != nil && o.K8sClustersProvisioned != nil { +// HasReservedIpsInUse returns a boolean if a field has been set. +func (o *ResourceLimits) HasReservedIpsInUse() bool { + if o != nil && o.ReservedIpsInUse != nil { return true } return false } -// GetNlbLimitTotal returns the NlbLimitTotal field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetNlbLimitTotal() *int32 { +// GetReservedIpsOnContract returns the ReservedIpsOnContract field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetReservedIpsOnContract() *int32 { if o == nil { return nil } - return o.NlbLimitTotal + return o.ReservedIpsOnContract } -// GetNlbLimitTotalOk returns a tuple with the NlbLimitTotal field value +// GetReservedIpsOnContractOk returns a tuple with the ReservedIpsOnContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetNlbLimitTotalOk() (*int32, bool) { +func (o *ResourceLimits) GetReservedIpsOnContractOk() (*int32, bool) { if o == nil { return nil, false } - return o.NlbLimitTotal, true + return o.ReservedIpsOnContract, true } -// SetNlbLimitTotal sets field value -func (o *ResourceLimits) SetNlbLimitTotal(v int32) { +// SetReservedIpsOnContract sets field value +func (o *ResourceLimits) SetReservedIpsOnContract(v int32) { - o.NlbLimitTotal = &v + o.ReservedIpsOnContract = &v } -// HasNlbLimitTotal returns a boolean if a field has been set. -func (o *ResourceLimits) HasNlbLimitTotal() bool { - if o != nil && o.NlbLimitTotal != nil { +// HasReservedIpsOnContract returns a boolean if a field has been set. +func (o *ResourceLimits) HasReservedIpsOnContract() bool { + if o != nil && o.ReservedIpsOnContract != nil { return true } return false } -// GetNlbProvisioned returns the NlbProvisioned field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetNlbProvisioned() *int32 { +// GetSsdLimitPerContract returns the SsdLimitPerContract field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetSsdLimitPerContract() *int64 { if o == nil { return nil } - return o.NlbProvisioned + return o.SsdLimitPerContract } -// GetNlbProvisionedOk returns a tuple with the NlbProvisioned field value +// GetSsdLimitPerContractOk returns a tuple with the SsdLimitPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetNlbProvisionedOk() (*int32, bool) { +func (o *ResourceLimits) GetSsdLimitPerContractOk() (*int64, bool) { if o == nil { return nil, false } - return o.NlbProvisioned, true + return o.SsdLimitPerContract, true } -// SetNlbProvisioned sets field value -func (o *ResourceLimits) SetNlbProvisioned(v int32) { +// SetSsdLimitPerContract sets field value +func (o *ResourceLimits) SetSsdLimitPerContract(v int64) { - o.NlbProvisioned = &v + o.SsdLimitPerContract = &v } -// HasNlbProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasNlbProvisioned() bool { - if o != nil && o.NlbProvisioned != nil { +// HasSsdLimitPerContract returns a boolean if a field has been set. +func (o *ResourceLimits) HasSsdLimitPerContract() bool { + if o != nil && o.SsdLimitPerContract != nil { return true } return false } -// GetNatGatewayLimitTotal returns the NatGatewayLimitTotal field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetNatGatewayLimitTotal() *int32 { +// GetSsdLimitPerVolume returns the SsdLimitPerVolume field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetSsdLimitPerVolume() *int64 { if o == nil { return nil } - return o.NatGatewayLimitTotal + return o.SsdLimitPerVolume } -// GetNatGatewayLimitTotalOk returns a tuple with the NatGatewayLimitTotal field value +// GetSsdLimitPerVolumeOk returns a tuple with the SsdLimitPerVolume field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetNatGatewayLimitTotalOk() (*int32, bool) { +func (o *ResourceLimits) GetSsdLimitPerVolumeOk() (*int64, bool) { if o == nil { return nil, false } - return o.NatGatewayLimitTotal, true + return o.SsdLimitPerVolume, true } -// SetNatGatewayLimitTotal sets field value -func (o *ResourceLimits) SetNatGatewayLimitTotal(v int32) { +// SetSsdLimitPerVolume sets field value +func (o *ResourceLimits) SetSsdLimitPerVolume(v int64) { - o.NatGatewayLimitTotal = &v + o.SsdLimitPerVolume = &v } -// HasNatGatewayLimitTotal returns a boolean if a field has been set. -func (o *ResourceLimits) HasNatGatewayLimitTotal() bool { - if o != nil && o.NatGatewayLimitTotal != nil { +// HasSsdLimitPerVolume returns a boolean if a field has been set. +func (o *ResourceLimits) HasSsdLimitPerVolume() bool { + if o != nil && o.SsdLimitPerVolume != nil { return true } return false } -// GetNatGatewayProvisioned returns the NatGatewayProvisioned field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ResourceLimits) GetNatGatewayProvisioned() *int32 { +// GetSsdVolumeProvisioned returns the SsdVolumeProvisioned field value +// If the value is explicit nil, nil is returned +func (o *ResourceLimits) GetSsdVolumeProvisioned() *int64 { if o == nil { return nil } - return o.NatGatewayProvisioned + return o.SsdVolumeProvisioned } -// GetNatGatewayProvisionedOk returns a tuple with the NatGatewayProvisioned field value +// GetSsdVolumeProvisionedOk returns a tuple with the SsdVolumeProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceLimits) GetNatGatewayProvisionedOk() (*int32, bool) { +func (o *ResourceLimits) GetSsdVolumeProvisionedOk() (*int64, bool) { if o == nil { return nil, false } - return o.NatGatewayProvisioned, true + return o.SsdVolumeProvisioned, true } -// SetNatGatewayProvisioned sets field value -func (o *ResourceLimits) SetNatGatewayProvisioned(v int32) { +// SetSsdVolumeProvisioned sets field value +func (o *ResourceLimits) SetSsdVolumeProvisioned(v int64) { - o.NatGatewayProvisioned = &v + o.SsdVolumeProvisioned = &v } -// HasNatGatewayProvisioned returns a boolean if a field has been set. -func (o *ResourceLimits) HasNatGatewayProvisioned() bool { - if o != nil && o.NatGatewayProvisioned != nil { +// HasSsdVolumeProvisioned returns a boolean if a field has been set. +func (o *ResourceLimits) HasSsdVolumeProvisioned() bool { + if o != nil && o.SsdVolumeProvisioned != nil { return true } @@ -941,72 +941,94 @@ func (o *ResourceLimits) HasNatGatewayProvisioned() bool { func (o ResourceLimits) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.CoresPerServer != nil { - toSerialize["coresPerServer"] = o.CoresPerServer - } if o.CoresPerContract != nil { toSerialize["coresPerContract"] = o.CoresPerContract } + + if o.CoresPerServer != nil { + toSerialize["coresPerServer"] = o.CoresPerServer + } + if o.CoresProvisioned != nil { toSerialize["coresProvisioned"] = o.CoresProvisioned } - if o.RamPerServer != nil { - toSerialize["ramPerServer"] = o.RamPerServer - } - if o.RamPerContract != nil { - toSerialize["ramPerContract"] = o.RamPerContract + + if o.DasVolumeProvisioned != nil { + toSerialize["dasVolumeProvisioned"] = o.DasVolumeProvisioned } - if o.RamProvisioned != nil { - toSerialize["ramProvisioned"] = o.RamProvisioned + + if o.HddLimitPerContract != nil { + toSerialize["hddLimitPerContract"] = o.HddLimitPerContract } + if o.HddLimitPerVolume != nil { toSerialize["hddLimitPerVolume"] = o.HddLimitPerVolume } - if o.HddLimitPerContract != nil { - toSerialize["hddLimitPerContract"] = o.HddLimitPerContract - } + if o.HddVolumeProvisioned != nil { toSerialize["hddVolumeProvisioned"] = o.HddVolumeProvisioned } - if o.SsdLimitPerVolume != nil { - toSerialize["ssdLimitPerVolume"] = o.SsdLimitPerVolume - } - if o.SsdLimitPerContract != nil { - toSerialize["ssdLimitPerContract"] = o.SsdLimitPerContract - } - if o.SsdVolumeProvisioned != nil { - toSerialize["ssdVolumeProvisioned"] = o.SsdVolumeProvisioned - } - if o.DasVolumeProvisioned != nil { - toSerialize["dasVolumeProvisioned"] = o.DasVolumeProvisioned - } - if o.ReservableIps != nil { - toSerialize["reservableIps"] = o.ReservableIps - } - if o.ReservedIpsOnContract != nil { - toSerialize["reservedIpsOnContract"] = o.ReservedIpsOnContract - } - if o.ReservedIpsInUse != nil { - toSerialize["reservedIpsInUse"] = o.ReservedIpsInUse - } + if o.K8sClusterLimitTotal != nil { toSerialize["k8sClusterLimitTotal"] = o.K8sClusterLimitTotal } + if o.K8sClustersProvisioned != nil { toSerialize["k8sClustersProvisioned"] = o.K8sClustersProvisioned } + + if o.NatGatewayLimitTotal != nil { + toSerialize["natGatewayLimitTotal"] = o.NatGatewayLimitTotal + } + + if o.NatGatewayProvisioned != nil { + toSerialize["natGatewayProvisioned"] = o.NatGatewayProvisioned + } + if o.NlbLimitTotal != nil { toSerialize["nlbLimitTotal"] = o.NlbLimitTotal } + if o.NlbProvisioned != nil { toSerialize["nlbProvisioned"] = o.NlbProvisioned } - if o.NatGatewayLimitTotal != nil { - toSerialize["natGatewayLimitTotal"] = o.NatGatewayLimitTotal + + if o.RamPerContract != nil { + toSerialize["ramPerContract"] = o.RamPerContract } - if o.NatGatewayProvisioned != nil { - toSerialize["natGatewayProvisioned"] = o.NatGatewayProvisioned + + if o.RamPerServer != nil { + toSerialize["ramPerServer"] = o.RamPerServer + } + + if o.RamProvisioned != nil { + toSerialize["ramProvisioned"] = o.RamProvisioned } + + if o.ReservableIps != nil { + toSerialize["reservableIps"] = o.ReservableIps + } + + if o.ReservedIpsInUse != nil { + toSerialize["reservedIpsInUse"] = o.ReservedIpsInUse + } + + if o.ReservedIpsOnContract != nil { + toSerialize["reservedIpsOnContract"] = o.ReservedIpsOnContract + } + + if o.SsdLimitPerContract != nil { + toSerialize["ssdLimitPerContract"] = o.SsdLimitPerContract + } + + if o.SsdLimitPerVolume != nil { + toSerialize["ssdLimitPerVolume"] = o.SsdLimitPerVolume + } + + if o.SsdVolumeProvisioned != nil { + toSerialize["ssdVolumeProvisioned"] = o.SsdVolumeProvisioned + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_properties.go index b5b274a28eb7..224350ec56cf 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_properties.go @@ -41,7 +41,7 @@ func NewResourcePropertiesWithDefaults() *ResourceProperties { } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *ResourceProperties) GetName() *string { if o == nil { return nil @@ -79,7 +79,7 @@ func (o *ResourceProperties) HasName() bool { } // GetSecAuthProtection returns the SecAuthProtection field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *ResourceProperties) GetSecAuthProtection() *bool { if o == nil { return nil @@ -121,9 +121,11 @@ func (o ResourceProperties) MarshalJSON() ([]byte, error) { if o.Name != nil { toSerialize["name"] = o.Name } + if o.SecAuthProtection != nil { toSerialize["secAuthProtection"] = o.SecAuthProtection } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_reference.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_reference.go index 5732ab570165..6b58f76a354c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_reference.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resource_reference.go @@ -16,12 +16,12 @@ import ( // ResourceReference struct for ResourceReference type ResourceReference struct { + // URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. Id *string `json:"id"` // The type of object that has been created. Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` } // NewResourceReference instantiates a new ResourceReference object @@ -44,114 +44,114 @@ func NewResourceReferenceWithDefaults() *ResourceReference { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ResourceReference) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ResourceReference) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceReference) GetIdOk() (*string, bool) { +func (o *ResourceReference) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *ResourceReference) SetId(v string) { +// SetHref sets field value +func (o *ResourceReference) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *ResourceReference) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *ResourceReference) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ResourceReference) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ResourceReference) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceReference) GetTypeOk() (*Type, bool) { +func (o *ResourceReference) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *ResourceReference) SetType(v Type) { +// SetId sets field value +func (o *ResourceReference) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *ResourceReference) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *ResourceReference) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ResourceReference) GetHref() *string { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ResourceReference) GetType() *Type { if o == nil { return nil } - return o.Href + return o.Type } -// GetHrefOk returns a tuple with the Href field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceReference) GetHrefOk() (*string, bool) { +func (o *ResourceReference) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Type, true } -// SetHref sets field value -func (o *ResourceReference) SetHref(v string) { +// SetType sets field value +func (o *ResourceReference) SetType(v Type) { - o.Href = &v + o.Type = &v } -// HasHref returns a boolean if a field has been set. -func (o *ResourceReference) HasHref() bool { - if o != nil && o.Href != nil { +// HasType returns a boolean if a field has been set. +func (o *ResourceReference) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -160,15 +160,18 @@ func (o *ResourceReference) HasHref() bool { func (o ResourceReference) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.Href != nil { + toSerialize["href"] = o.Href + } + if o.Id != nil { toSerialize["id"] = o.Id } + if o.Type != nil { toSerialize["type"] = o.Type } - if o.Href != nil { - toSerialize["href"] = o.Href - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources.go index 36b8beeabff6..9db504339fb6 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources.go @@ -16,14 +16,14 @@ import ( // Resources Collection to represent the resource. type Resources struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Resource `json:"items,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewResources instantiates a new Resources object @@ -44,152 +44,152 @@ func NewResourcesWithDefaults() *Resources { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Resources) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Resources) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resources) GetIdOk() (*string, bool) { +func (o *Resources) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Resources) SetId(v string) { +// SetHref sets field value +func (o *Resources) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Resources) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Resources) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Resources) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Resources) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resources) GetTypeOk() (*Type, bool) { +func (o *Resources) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Resources) SetType(v Type) { +// SetId sets field value +func (o *Resources) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Resources) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Resources) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Resources) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Resources) GetItems() *[]Resource { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resources) GetHrefOk() (*string, bool) { +func (o *Resources) GetItemsOk() (*[]Resource, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Resources) SetHref(v string) { +// SetItems sets field value +func (o *Resources) SetItems(v []Resource) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Resources) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Resources) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Resource will be returned -func (o *Resources) GetItems() *[]Resource { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Resources) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Resources) GetItemsOk() (*[]Resource, bool) { +func (o *Resources) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Resources) SetItems(v []Resource) { +// SetType sets field value +func (o *Resources) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Resources) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Resources) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Resources) HasItems() bool { func (o Resources) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources_users.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources_users.go index 18de5cf52d40..e8772006c89a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources_users.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_resources_users.go @@ -16,14 +16,14 @@ import ( // ResourcesUsers Resources owned by a user. type ResourcesUsers struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Resource `json:"items,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewResourcesUsers instantiates a new ResourcesUsers object @@ -44,152 +44,152 @@ func NewResourcesUsersWithDefaults() *ResourcesUsers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ResourcesUsers) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *ResourcesUsers) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourcesUsers) GetIdOk() (*string, bool) { +func (o *ResourcesUsers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *ResourcesUsers) SetId(v string) { +// SetHref sets field value +func (o *ResourcesUsers) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *ResourcesUsers) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *ResourcesUsers) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ResourcesUsers) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *ResourcesUsers) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourcesUsers) GetTypeOk() (*Type, bool) { +func (o *ResourcesUsers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *ResourcesUsers) SetType(v Type) { +// SetId sets field value +func (o *ResourcesUsers) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *ResourcesUsers) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *ResourcesUsers) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ResourcesUsers) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *ResourcesUsers) GetItems() *[]Resource { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourcesUsers) GetHrefOk() (*string, bool) { +func (o *ResourcesUsers) GetItemsOk() (*[]Resource, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *ResourcesUsers) SetHref(v string) { +// SetItems sets field value +func (o *ResourcesUsers) SetItems(v []Resource) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *ResourcesUsers) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *ResourcesUsers) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Resource will be returned -func (o *ResourcesUsers) GetItems() *[]Resource { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *ResourcesUsers) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourcesUsers) GetItemsOk() (*[]Resource, bool) { +func (o *ResourcesUsers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *ResourcesUsers) SetItems(v []Resource) { +// SetType sets field value +func (o *ResourcesUsers) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *ResourcesUsers) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *ResourcesUsers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *ResourcesUsers) HasItems() bool { func (o ResourcesUsers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_bucket.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_bucket.go index cf175f53861e..5e263873ce61 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_bucket.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_bucket.go @@ -16,7 +16,7 @@ import ( // S3Bucket struct for S3Bucket type S3Bucket struct { - // Name of the S3 bucket + // The name of the S3 bucket. Name *string `json:"name"` } @@ -41,7 +41,7 @@ func NewS3BucketWithDefaults() *S3Bucket { } // GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *S3Bucket) GetName() *string { if o == nil { return nil @@ -83,6 +83,7 @@ func (o S3Bucket) MarshalJSON() ([]byte, error) { if o.Name != nil { toSerialize["name"] = o.Name } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key.go index 5febf4192a4b..ae9f00908b85 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key.go @@ -16,14 +16,14 @@ import ( // S3Key struct for S3Key type S3Key struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *S3KeyMetadata `json:"metadata,omitempty"` Properties *S3KeyProperties `json:"properties"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewS3Key instantiates a new S3Key object @@ -46,190 +46,190 @@ func NewS3KeyWithDefaults() *S3Key { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *S3Key) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *S3Key) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Key) GetIdOk() (*string, bool) { +func (o *S3Key) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *S3Key) SetId(v string) { +// SetHref sets field value +func (o *S3Key) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *S3Key) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *S3Key) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *S3Key) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *S3Key) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Key) GetTypeOk() (*Type, bool) { +func (o *S3Key) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *S3Key) SetType(v Type) { +// SetId sets field value +func (o *S3Key) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *S3Key) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *S3Key) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *S3Key) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *S3Key) GetMetadata() *S3KeyMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Key) GetHrefOk() (*string, bool) { +func (o *S3Key) GetMetadataOk() (*S3KeyMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *S3Key) SetHref(v string) { +// SetMetadata sets field value +func (o *S3Key) SetMetadata(v S3KeyMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *S3Key) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *S3Key) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for S3KeyMetadata will be returned -func (o *S3Key) GetMetadata() *S3KeyMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *S3Key) GetProperties() *S3KeyProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Key) GetMetadataOk() (*S3KeyMetadata, bool) { +func (o *S3Key) GetPropertiesOk() (*S3KeyProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *S3Key) SetMetadata(v S3KeyMetadata) { +// SetProperties sets field value +func (o *S3Key) SetProperties(v S3KeyProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *S3Key) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *S3Key) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for S3KeyProperties will be returned -func (o *S3Key) GetProperties() *S3KeyProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *S3Key) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Key) GetPropertiesOk() (*S3KeyProperties, bool) { +func (o *S3Key) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *S3Key) SetProperties(v S3KeyProperties) { +// SetType sets field value +func (o *S3Key) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *S3Key) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *S3Key) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *S3Key) HasProperties() bool { func (o S3Key) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_metadata.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_metadata.go index 83ecc8b46385..f090555e7d86 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_metadata.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_metadata.go @@ -17,10 +17,10 @@ import ( // S3KeyMetadata struct for S3KeyMetadata type S3KeyMetadata struct { - // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. - Etag *string `json:"etag,omitempty"` // The time when the S3 key was created. CreatedDate *IonosTime + // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. + Etag *string `json:"etag,omitempty"` } // NewS3KeyMetadata instantiates a new S3KeyMetadata object @@ -41,83 +41,83 @@ func NewS3KeyMetadataWithDefaults() *S3KeyMetadata { return &this } -// GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *S3KeyMetadata) GetEtag() *string { +// GetCreatedDate returns the CreatedDate field value +// If the value is explicit nil, nil is returned +func (o *S3KeyMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } - return o.Etag + if o.CreatedDate == nil { + return nil + } + return &o.CreatedDate.Time } -// GetEtagOk returns a tuple with the Etag field value +// GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3KeyMetadata) GetEtagOk() (*string, bool) { +func (o *S3KeyMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.Etag, true + if o.CreatedDate == nil { + return nil, false + } + return &o.CreatedDate.Time, true + } -// SetEtag sets field value -func (o *S3KeyMetadata) SetEtag(v string) { +// SetCreatedDate sets field value +func (o *S3KeyMetadata) SetCreatedDate(v time.Time) { - o.Etag = &v + o.CreatedDate = &IonosTime{v} } -// HasEtag returns a boolean if a field has been set. -func (o *S3KeyMetadata) HasEtag() bool { - if o != nil && o.Etag != nil { +// HasCreatedDate returns a boolean if a field has been set. +func (o *S3KeyMetadata) HasCreatedDate() bool { + if o != nil && o.CreatedDate != nil { return true } return false } -// GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *S3KeyMetadata) GetCreatedDate() *time.Time { +// GetEtag returns the Etag field value +// If the value is explicit nil, nil is returned +func (o *S3KeyMetadata) GetEtag() *string { if o == nil { return nil } - if o.CreatedDate == nil { - return nil - } - return &o.CreatedDate.Time + return o.Etag } -// GetCreatedDateOk returns a tuple with the CreatedDate field value +// GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3KeyMetadata) GetCreatedDateOk() (*time.Time, bool) { +func (o *S3KeyMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } - if o.CreatedDate == nil { - return nil, false - } - return &o.CreatedDate.Time, true - + return o.Etag, true } -// SetCreatedDate sets field value -func (o *S3KeyMetadata) SetCreatedDate(v time.Time) { +// SetEtag sets field value +func (o *S3KeyMetadata) SetEtag(v string) { - o.CreatedDate = &IonosTime{v} + o.Etag = &v } -// HasCreatedDate returns a boolean if a field has been set. -func (o *S3KeyMetadata) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { +// HasEtag returns a boolean if a field has been set. +func (o *S3KeyMetadata) HasEtag() bool { + if o != nil && o.Etag != nil { return true } @@ -126,12 +126,14 @@ func (o *S3KeyMetadata) HasCreatedDate() bool { func (o S3KeyMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Etag != nil { - toSerialize["etag"] = o.Etag - } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } + + if o.Etag != nil { + toSerialize["etag"] = o.Etag + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_properties.go index a3204d717c36..0cf12e771162 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_key_properties.go @@ -16,10 +16,10 @@ import ( // S3KeyProperties struct for S3KeyProperties type S3KeyProperties struct { - // Secret of the S3 key. - SecretKey *string `json:"secretKey,omitempty"` // Denotes weather the S3 key is active. Active *bool `json:"active,omitempty"` + // Secret of the S3 key. + SecretKey *string `json:"secretKey,omitempty"` } // NewS3KeyProperties instantiates a new S3KeyProperties object @@ -40,76 +40,76 @@ func NewS3KeyPropertiesWithDefaults() *S3KeyProperties { return &this } -// GetSecretKey returns the SecretKey field value -// If the value is explicit nil, the zero value for string will be returned -func (o *S3KeyProperties) GetSecretKey() *string { +// GetActive returns the Active field value +// If the value is explicit nil, nil is returned +func (o *S3KeyProperties) GetActive() *bool { if o == nil { return nil } - return o.SecretKey + return o.Active } -// GetSecretKeyOk returns a tuple with the SecretKey field value +// GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3KeyProperties) GetSecretKeyOk() (*string, bool) { +func (o *S3KeyProperties) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.SecretKey, true + return o.Active, true } -// SetSecretKey sets field value -func (o *S3KeyProperties) SetSecretKey(v string) { +// SetActive sets field value +func (o *S3KeyProperties) SetActive(v bool) { - o.SecretKey = &v + o.Active = &v } -// HasSecretKey returns a boolean if a field has been set. -func (o *S3KeyProperties) HasSecretKey() bool { - if o != nil && o.SecretKey != nil { +// HasActive returns a boolean if a field has been set. +func (o *S3KeyProperties) HasActive() bool { + if o != nil && o.Active != nil { return true } return false } -// GetActive returns the Active field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *S3KeyProperties) GetActive() *bool { +// GetSecretKey returns the SecretKey field value +// If the value is explicit nil, nil is returned +func (o *S3KeyProperties) GetSecretKey() *string { if o == nil { return nil } - return o.Active + return o.SecretKey } -// GetActiveOk returns a tuple with the Active field value +// GetSecretKeyOk returns a tuple with the SecretKey field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3KeyProperties) GetActiveOk() (*bool, bool) { +func (o *S3KeyProperties) GetSecretKeyOk() (*string, bool) { if o == nil { return nil, false } - return o.Active, true + return o.SecretKey, true } -// SetActive sets field value -func (o *S3KeyProperties) SetActive(v bool) { +// SetSecretKey sets field value +func (o *S3KeyProperties) SetSecretKey(v string) { - o.Active = &v + o.SecretKey = &v } -// HasActive returns a boolean if a field has been set. -func (o *S3KeyProperties) HasActive() bool { - if o != nil && o.Active != nil { +// HasSecretKey returns a boolean if a field has been set. +func (o *S3KeyProperties) HasSecretKey() bool { + if o != nil && o.SecretKey != nil { return true } @@ -118,12 +118,14 @@ func (o *S3KeyProperties) HasActive() bool { func (o S3KeyProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.SecretKey != nil { - toSerialize["secretKey"] = o.SecretKey - } if o.Active != nil { toSerialize["active"] = o.Active } + + if o.SecretKey != nil { + toSerialize["secretKey"] = o.SecretKey + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_keys.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_keys.go index a87bc2f76acb..d0ed78cc64b1 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_keys.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_keys.go @@ -16,14 +16,14 @@ import ( // S3Keys struct for S3Keys type S3Keys struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of the resource. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]S3Key `json:"items,omitempty"` + // The type of the resource. + Type *Type `json:"type,omitempty"` } // NewS3Keys instantiates a new S3Keys object @@ -44,152 +44,152 @@ func NewS3KeysWithDefaults() *S3Keys { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *S3Keys) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *S3Keys) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Keys) GetIdOk() (*string, bool) { +func (o *S3Keys) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *S3Keys) SetId(v string) { +// SetHref sets field value +func (o *S3Keys) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *S3Keys) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *S3Keys) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *S3Keys) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *S3Keys) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Keys) GetTypeOk() (*Type, bool) { +func (o *S3Keys) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *S3Keys) SetType(v Type) { +// SetId sets field value +func (o *S3Keys) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *S3Keys) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *S3Keys) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *S3Keys) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *S3Keys) GetItems() *[]S3Key { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Keys) GetHrefOk() (*string, bool) { +func (o *S3Keys) GetItemsOk() (*[]S3Key, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *S3Keys) SetHref(v string) { +// SetItems sets field value +func (o *S3Keys) SetItems(v []S3Key) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *S3Keys) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *S3Keys) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []S3Key will be returned -func (o *S3Keys) GetItems() *[]S3Key { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *S3Keys) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *S3Keys) GetItemsOk() (*[]S3Key, bool) { +func (o *S3Keys) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *S3Keys) SetItems(v []S3Key) { +// SetType sets field value +func (o *S3Keys) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *S3Keys) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *S3Keys) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *S3Keys) HasItems() bool { func (o S3Keys) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_object_storage_sso.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_object_storage_sso.go index 48eb4b166cbb..809410a0487e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_object_storage_sso.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_s3_object_storage_sso.go @@ -39,7 +39,7 @@ func NewS3ObjectStorageSSOWithDefaults() *S3ObjectStorageSSO { } // GetSsoUrl returns the SsoUrl field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *S3ObjectStorageSSO) GetSsoUrl() *string { if o == nil { return nil @@ -81,6 +81,7 @@ func (o S3ObjectStorageSSO) MarshalJSON() ([]byte, error) { if o.SsoUrl != nil { toSerialize["ssoUrl"] = o.SsoUrl } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server.go index ad75b98a1650..4002c4bda88c 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server.go @@ -16,15 +16,15 @@ import ( // Server struct for Server type Server struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *ServerEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ServerProperties `json:"properties"` - Entities *ServerEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewServer instantiates a new Server object @@ -47,114 +47,114 @@ func NewServerWithDefaults() *Server { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Server) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *Server) GetEntities() *ServerEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Server) GetIdOk() (*string, bool) { +func (o *Server) GetEntitiesOk() (*ServerEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *Server) SetId(v string) { +// SetEntities sets field value +func (o *Server) SetEntities(v ServerEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *Server) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *Server) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Server) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Server) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Server) GetTypeOk() (*Type, bool) { +func (o *Server) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Server) SetType(v Type) { +// SetHref sets field value +func (o *Server) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Server) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Server) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Server) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Server) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Server) GetHrefOk() (*string, bool) { +func (o *Server) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Server) SetHref(v string) { +// SetId sets field value +func (o *Server) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Server) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Server) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *Server) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned +// If the value is explicit nil, nil is returned func (o *Server) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *Server) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ServerProperties will be returned +// If the value is explicit nil, nil is returned func (o *Server) GetProperties() *ServerProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *Server) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for ServerEntities will be returned -func (o *Server) GetEntities() *ServerEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Server) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Server) GetEntitiesOk() (*ServerEntities, bool) { +func (o *Server) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *Server) SetEntities(v ServerEntities) { +// SetType sets field value +func (o *Server) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *Server) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *Server) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *Server) HasEntities() bool { func (o Server) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_entities.go index fcb42fdb285a..a2a8b8912d37 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_entities.go @@ -17,8 +17,8 @@ import ( // ServerEntities struct for ServerEntities type ServerEntities struct { Cdroms *Cdroms `json:"cdroms,omitempty"` - Volumes *AttachedVolumes `json:"volumes,omitempty"` Nics *Nics `json:"nics,omitempty"` + Volumes *AttachedVolumes `json:"volumes,omitempty"` } // NewServerEntities instantiates a new ServerEntities object @@ -40,7 +40,7 @@ func NewServerEntitiesWithDefaults() *ServerEntities { } // GetCdroms returns the Cdroms field value -// If the value is explicit nil, the zero value for Cdroms will be returned +// If the value is explicit nil, nil is returned func (o *ServerEntities) GetCdroms() *Cdroms { if o == nil { return nil @@ -77,76 +77,76 @@ func (o *ServerEntities) HasCdroms() bool { return false } -// GetVolumes returns the Volumes field value -// If the value is explicit nil, the zero value for AttachedVolumes will be returned -func (o *ServerEntities) GetVolumes() *AttachedVolumes { +// GetNics returns the Nics field value +// If the value is explicit nil, nil is returned +func (o *ServerEntities) GetNics() *Nics { if o == nil { return nil } - return o.Volumes + return o.Nics } -// GetVolumesOk returns a tuple with the Volumes field value +// GetNicsOk returns a tuple with the Nics field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerEntities) GetVolumesOk() (*AttachedVolumes, bool) { +func (o *ServerEntities) GetNicsOk() (*Nics, bool) { if o == nil { return nil, false } - return o.Volumes, true + return o.Nics, true } -// SetVolumes sets field value -func (o *ServerEntities) SetVolumes(v AttachedVolumes) { +// SetNics sets field value +func (o *ServerEntities) SetNics(v Nics) { - o.Volumes = &v + o.Nics = &v } -// HasVolumes returns a boolean if a field has been set. -func (o *ServerEntities) HasVolumes() bool { - if o != nil && o.Volumes != nil { +// HasNics returns a boolean if a field has been set. +func (o *ServerEntities) HasNics() bool { + if o != nil && o.Nics != nil { return true } return false } -// GetNics returns the Nics field value -// If the value is explicit nil, the zero value for Nics will be returned -func (o *ServerEntities) GetNics() *Nics { +// GetVolumes returns the Volumes field value +// If the value is explicit nil, nil is returned +func (o *ServerEntities) GetVolumes() *AttachedVolumes { if o == nil { return nil } - return o.Nics + return o.Volumes } -// GetNicsOk returns a tuple with the Nics field value +// GetVolumesOk returns a tuple with the Volumes field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerEntities) GetNicsOk() (*Nics, bool) { +func (o *ServerEntities) GetVolumesOk() (*AttachedVolumes, bool) { if o == nil { return nil, false } - return o.Nics, true + return o.Volumes, true } -// SetNics sets field value -func (o *ServerEntities) SetNics(v Nics) { +// SetVolumes sets field value +func (o *ServerEntities) SetVolumes(v AttachedVolumes) { - o.Nics = &v + o.Volumes = &v } -// HasNics returns a boolean if a field has been set. -func (o *ServerEntities) HasNics() bool { - if o != nil && o.Nics != nil { +// HasVolumes returns a boolean if a field has been set. +func (o *ServerEntities) HasVolumes() bool { + if o != nil && o.Volumes != nil { return true } @@ -158,12 +158,15 @@ func (o ServerEntities) MarshalJSON() ([]byte, error) { if o.Cdroms != nil { toSerialize["cdroms"] = o.Cdroms } - if o.Volumes != nil { - toSerialize["volumes"] = o.Volumes - } + if o.Nics != nil { toSerialize["nics"] = o.Nics } + + if o.Volumes != nil { + toSerialize["volumes"] = o.Volumes + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_properties.go index eb67dfcc5960..5b81d95518d8 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_server_properties.go @@ -16,36 +16,35 @@ import ( // ServerProperties struct for ServerProperties type ServerProperties struct { - // The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. - TemplateUuid *string `json:"templateUuid,omitempty"` - // The name of the resource. - Name *string `json:"name,omitempty"` - // The total number of cores for the server. - Cores *int32 `json:"cores"` - // The memory size for the server in MB, such as 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set ramHotPlug to TRUE then you must use a minimum of 1024 MB. If you set the RAM size more than 240GB, then ramHotPlug will be set to FALSE and can not be set to TRUE unless RAM size not set to less than 240GB. - Ram *int32 `json:"ram"` // The availability zone in which the server should be provisioned. - AvailabilityZone *string `json:"availabilityZone,omitempty"` - // Status of the virtual machine. - VmState *string `json:"vmState,omitempty"` - BootCdrom *ResourceReference `json:"bootCdrom,omitempty"` - BootVolume *ResourceReference `json:"bootVolume,omitempty"` - // CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource. + AvailabilityZone *string `json:"availabilityZone,omitempty"` + BootCdrom *ResourceReference `json:"bootCdrom,omitempty"` + BootVolume *ResourceReference `json:"bootVolume,omitempty"` + // The total number of cores for the enterprise server. + Cores *int32 `json:"cores,omitempty"` + // CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for CUBE servers. CpuFamily *string `json:"cpuFamily,omitempty"` - // server usages: ENTERPRISE or CUBE + // The name of the resource. + Name *string `json:"name,omitempty"` + // The placement group ID that belongs to this server; Requires system privileges + PlacementGroupId *string `json:"placementGroupId,omitempty"` + // The memory size for the enterprise server in MB, such as 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set ramHotPlug to TRUE then you must use a minimum of 1024 MB. If you set the RAM size more than 240GB, then ramHotPlug will be set to FALSE and can not be set to TRUE unless RAM size not set to less than 240GB. + Ram *int32 `json:"ram,omitempty"` + // The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. + TemplateUuid *string `json:"templateUuid,omitempty"` + // Server type: CUBE or ENTERPRISE. Type *string `json:"type,omitempty"` + // Status of the virtual machine. + VmState *string `json:"vmState,omitempty"` } // NewServerProperties instantiates a new ServerProperties 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 NewServerProperties(cores int32, ram int32) *ServerProperties { +func NewServerProperties() *ServerProperties { this := ServerProperties{} - this.Cores = &cores - this.Ram = &ram - return &this } @@ -57,342 +56,342 @@ func NewServerPropertiesWithDefaults() *ServerProperties { return &this } -// GetTemplateUuid returns the TemplateUuid field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ServerProperties) GetTemplateUuid() *string { +// GetAvailabilityZone returns the AvailabilityZone field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetAvailabilityZone() *string { if o == nil { return nil } - return o.TemplateUuid + return o.AvailabilityZone } -// GetTemplateUuidOk returns a tuple with the TemplateUuid field value +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetTemplateUuidOk() (*string, bool) { +func (o *ServerProperties) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } - return o.TemplateUuid, true + return o.AvailabilityZone, true } -// SetTemplateUuid sets field value -func (o *ServerProperties) SetTemplateUuid(v string) { +// SetAvailabilityZone sets field value +func (o *ServerProperties) SetAvailabilityZone(v string) { - o.TemplateUuid = &v + o.AvailabilityZone = &v } -// HasTemplateUuid returns a boolean if a field has been set. -func (o *ServerProperties) HasTemplateUuid() bool { - if o != nil && o.TemplateUuid != nil { +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *ServerProperties) HasAvailabilityZone() bool { + if o != nil && o.AvailabilityZone != nil { return true } return false } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ServerProperties) GetName() *string { +// GetBootCdrom returns the BootCdrom field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetBootCdrom() *ResourceReference { if o == nil { return nil } - return o.Name + return o.BootCdrom } -// GetNameOk returns a tuple with the Name field value +// GetBootCdromOk returns a tuple with the BootCdrom field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetNameOk() (*string, bool) { +func (o *ServerProperties) GetBootCdromOk() (*ResourceReference, bool) { if o == nil { return nil, false } - return o.Name, true + return o.BootCdrom, true } -// SetName sets field value -func (o *ServerProperties) SetName(v string) { +// SetBootCdrom sets field value +func (o *ServerProperties) SetBootCdrom(v ResourceReference) { - o.Name = &v + o.BootCdrom = &v } -// HasName returns a boolean if a field has been set. -func (o *ServerProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasBootCdrom returns a boolean if a field has been set. +func (o *ServerProperties) HasBootCdrom() bool { + if o != nil && o.BootCdrom != nil { return true } return false } -// GetCores returns the Cores field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ServerProperties) GetCores() *int32 { +// GetBootVolume returns the BootVolume field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetBootVolume() *ResourceReference { if o == nil { return nil } - return o.Cores + return o.BootVolume } -// GetCoresOk returns a tuple with the Cores field value +// GetBootVolumeOk returns a tuple with the BootVolume field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetCoresOk() (*int32, bool) { +func (o *ServerProperties) GetBootVolumeOk() (*ResourceReference, bool) { if o == nil { return nil, false } - return o.Cores, true + return o.BootVolume, true } -// SetCores sets field value -func (o *ServerProperties) SetCores(v int32) { +// SetBootVolume sets field value +func (o *ServerProperties) SetBootVolume(v ResourceReference) { - o.Cores = &v + o.BootVolume = &v } -// HasCores returns a boolean if a field has been set. -func (o *ServerProperties) HasCores() bool { - if o != nil && o.Cores != nil { +// HasBootVolume returns a boolean if a field has been set. +func (o *ServerProperties) HasBootVolume() bool { + if o != nil && o.BootVolume != nil { return true } return false } -// GetRam returns the Ram field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ServerProperties) GetRam() *int32 { +// GetCores returns the Cores field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetCores() *int32 { if o == nil { return nil } - return o.Ram + return o.Cores } -// GetRamOk returns a tuple with the Ram field value +// GetCoresOk returns a tuple with the Cores field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetRamOk() (*int32, bool) { +func (o *ServerProperties) GetCoresOk() (*int32, bool) { if o == nil { return nil, false } - return o.Ram, true + return o.Cores, true } -// SetRam sets field value -func (o *ServerProperties) SetRam(v int32) { +// SetCores sets field value +func (o *ServerProperties) SetCores(v int32) { - o.Ram = &v + o.Cores = &v } -// HasRam returns a boolean if a field has been set. -func (o *ServerProperties) HasRam() bool { - if o != nil && o.Ram != nil { +// HasCores returns a boolean if a field has been set. +func (o *ServerProperties) HasCores() bool { + if o != nil && o.Cores != nil { return true } return false } -// GetAvailabilityZone returns the AvailabilityZone field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ServerProperties) GetAvailabilityZone() *string { +// GetCpuFamily returns the CpuFamily field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetCpuFamily() *string { if o == nil { return nil } - return o.AvailabilityZone + return o.CpuFamily } -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetAvailabilityZoneOk() (*string, bool) { +func (o *ServerProperties) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailabilityZone, true + return o.CpuFamily, true } -// SetAvailabilityZone sets field value -func (o *ServerProperties) SetAvailabilityZone(v string) { +// SetCpuFamily sets field value +func (o *ServerProperties) SetCpuFamily(v string) { - o.AvailabilityZone = &v + o.CpuFamily = &v } -// HasAvailabilityZone returns a boolean if a field has been set. -func (o *ServerProperties) HasAvailabilityZone() bool { - if o != nil && o.AvailabilityZone != nil { +// HasCpuFamily returns a boolean if a field has been set. +func (o *ServerProperties) HasCpuFamily() bool { + if o != nil && o.CpuFamily != nil { return true } return false } -// GetVmState returns the VmState field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ServerProperties) GetVmState() *string { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetName() *string { if o == nil { return nil } - return o.VmState + return o.Name } -// GetVmStateOk returns a tuple with the VmState field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetVmStateOk() (*string, bool) { +func (o *ServerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.VmState, true + return o.Name, true } -// SetVmState sets field value -func (o *ServerProperties) SetVmState(v string) { +// SetName sets field value +func (o *ServerProperties) SetName(v string) { - o.VmState = &v + o.Name = &v } -// HasVmState returns a boolean if a field has been set. -func (o *ServerProperties) HasVmState() bool { - if o != nil && o.VmState != nil { +// HasName returns a boolean if a field has been set. +func (o *ServerProperties) HasName() bool { + if o != nil && o.Name != nil { return true } return false } -// GetBootCdrom returns the BootCdrom field value -// If the value is explicit nil, the zero value for ResourceReference will be returned -func (o *ServerProperties) GetBootCdrom() *ResourceReference { +// GetPlacementGroupId returns the PlacementGroupId field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetPlacementGroupId() *string { if o == nil { return nil } - return o.BootCdrom + return o.PlacementGroupId } -// GetBootCdromOk returns a tuple with the BootCdrom field value +// GetPlacementGroupIdOk returns a tuple with the PlacementGroupId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetBootCdromOk() (*ResourceReference, bool) { +func (o *ServerProperties) GetPlacementGroupIdOk() (*string, bool) { if o == nil { return nil, false } - return o.BootCdrom, true + return o.PlacementGroupId, true } -// SetBootCdrom sets field value -func (o *ServerProperties) SetBootCdrom(v ResourceReference) { +// SetPlacementGroupId sets field value +func (o *ServerProperties) SetPlacementGroupId(v string) { - o.BootCdrom = &v + o.PlacementGroupId = &v } -// HasBootCdrom returns a boolean if a field has been set. -func (o *ServerProperties) HasBootCdrom() bool { - if o != nil && o.BootCdrom != nil { +// HasPlacementGroupId returns a boolean if a field has been set. +func (o *ServerProperties) HasPlacementGroupId() bool { + if o != nil && o.PlacementGroupId != nil { return true } return false } -// GetBootVolume returns the BootVolume field value -// If the value is explicit nil, the zero value for ResourceReference will be returned -func (o *ServerProperties) GetBootVolume() *ResourceReference { +// GetRam returns the Ram field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetRam() *int32 { if o == nil { return nil } - return o.BootVolume + return o.Ram } -// GetBootVolumeOk returns a tuple with the BootVolume field value +// GetRamOk returns a tuple with the Ram field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetBootVolumeOk() (*ResourceReference, bool) { +func (o *ServerProperties) GetRamOk() (*int32, bool) { if o == nil { return nil, false } - return o.BootVolume, true + return o.Ram, true } -// SetBootVolume sets field value -func (o *ServerProperties) SetBootVolume(v ResourceReference) { +// SetRam sets field value +func (o *ServerProperties) SetRam(v int32) { - o.BootVolume = &v + o.Ram = &v } -// HasBootVolume returns a boolean if a field has been set. -func (o *ServerProperties) HasBootVolume() bool { - if o != nil && o.BootVolume != nil { +// HasRam returns a boolean if a field has been set. +func (o *ServerProperties) HasRam() bool { + if o != nil && o.Ram != nil { return true } return false } -// GetCpuFamily returns the CpuFamily field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ServerProperties) GetCpuFamily() *string { +// GetTemplateUuid returns the TemplateUuid field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetTemplateUuid() *string { if o == nil { return nil } - return o.CpuFamily + return o.TemplateUuid } -// GetCpuFamilyOk returns a tuple with the CpuFamily field value +// GetTemplateUuidOk returns a tuple with the TemplateUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ServerProperties) GetCpuFamilyOk() (*string, bool) { +func (o *ServerProperties) GetTemplateUuidOk() (*string, bool) { if o == nil { return nil, false } - return o.CpuFamily, true + return o.TemplateUuid, true } -// SetCpuFamily sets field value -func (o *ServerProperties) SetCpuFamily(v string) { +// SetTemplateUuid sets field value +func (o *ServerProperties) SetTemplateUuid(v string) { - o.CpuFamily = &v + o.TemplateUuid = &v } -// HasCpuFamily returns a boolean if a field has been set. -func (o *ServerProperties) HasCpuFamily() bool { - if o != nil && o.CpuFamily != nil { +// HasTemplateUuid returns a boolean if a field has been set. +func (o *ServerProperties) HasTemplateUuid() bool { + if o != nil && o.TemplateUuid != nil { return true } @@ -400,7 +399,7 @@ func (o *ServerProperties) HasCpuFamily() bool { } // GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *ServerProperties) GetType() *string { if o == nil { return nil @@ -437,38 +436,90 @@ func (o *ServerProperties) HasType() bool { return false } -func (o ServerProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.TemplateUuid != nil { - toSerialize["templateUuid"] = o.TemplateUuid - } - if o.Name != nil { - toSerialize["name"] = o.Name +// GetVmState returns the VmState field value +// If the value is explicit nil, nil is returned +func (o *ServerProperties) GetVmState() *string { + if o == nil { + return nil } - if o.Cores != nil { - toSerialize["cores"] = o.Cores + + return o.VmState + +} + +// GetVmStateOk returns a tuple with the VmState field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ServerProperties) GetVmStateOk() (*string, bool) { + if o == nil { + return nil, false } - if o.Ram != nil { - toSerialize["ram"] = o.Ram + + return o.VmState, true +} + +// SetVmState sets field value +func (o *ServerProperties) SetVmState(v string) { + + o.VmState = &v + +} + +// HasVmState returns a boolean if a field has been set. +func (o *ServerProperties) HasVmState() bool { + if o != nil && o.VmState != nil { + return true } + + return false +} + +func (o ServerProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} if o.AvailabilityZone != nil { toSerialize["availabilityZone"] = o.AvailabilityZone } - if o.VmState != nil { - toSerialize["vmState"] = o.VmState - } + if o.BootCdrom != nil { toSerialize["bootCdrom"] = o.BootCdrom } + if o.BootVolume != nil { toSerialize["bootVolume"] = o.BootVolume } + + if o.Cores != nil { + toSerialize["cores"] = o.Cores + } + if o.CpuFamily != nil { toSerialize["cpuFamily"] = o.CpuFamily } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.PlacementGroupId != nil { + toSerialize["placementGroupId"] = o.PlacementGroupId + } + + if o.Ram != nil { + toSerialize["ram"] = o.Ram + } + + if o.TemplateUuid != nil { + toSerialize["templateUuid"] = o.TemplateUuid + } + if o.Type != nil { toSerialize["type"] = o.Type } + + if o.VmState != nil { + toSerialize["vmState"] = o.VmState + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_servers.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_servers.go index 86fe0d2deead..789aeaeb5756 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_servers.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_servers.go @@ -16,19 +16,19 @@ import ( // Servers struct for Servers type Servers struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Server `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewServers instantiates a new Servers object @@ -49,114 +49,114 @@ func NewServersWithDefaults() *Servers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Servers) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Servers) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Servers) GetIdOk() (*string, bool) { +func (o *Servers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Servers) SetId(v string) { +// SetLinks sets field value +func (o *Servers) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Servers) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Servers) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Servers) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Servers) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Servers) GetTypeOk() (*Type, bool) { +func (o *Servers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Servers) SetType(v Type) { +// SetHref sets field value +func (o *Servers) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Servers) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Servers) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Servers) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Servers) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Servers) GetHrefOk() (*string, bool) { +func (o *Servers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Servers) SetHref(v string) { +// SetId sets field value +func (o *Servers) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Servers) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Servers) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Servers) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Server will be returned +// If the value is explicit nil, nil is returned func (o *Servers) GetItems() *[]Server { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Servers) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Servers) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Servers) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Servers) GetOffsetOk() (*float32, bool) { +func (o *Servers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Servers) SetOffset(v float32) { +// SetLimit sets field value +func (o *Servers) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Servers) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Servers) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Servers) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Servers) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Servers) GetLimitOk() (*float32, bool) { +func (o *Servers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Servers) SetLimit(v float32) { +// SetOffset sets field value +func (o *Servers) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Servers) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Servers) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Servers) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Servers) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Servers) GetLinksOk() (*PaginationLinks, bool) { +func (o *Servers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Servers) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Servers) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Servers) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Servers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Servers) HasLinks() bool { func (o Servers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot.go index 56ebb960da86..c42cc05467eb 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot.go @@ -16,14 +16,14 @@ import ( // Snapshot struct for Snapshot type Snapshot struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *SnapshotProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewSnapshot instantiates a new Snapshot object @@ -46,190 +46,190 @@ func NewSnapshotWithDefaults() *Snapshot { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Snapshot) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Snapshot) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshot) GetIdOk() (*string, bool) { +func (o *Snapshot) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Snapshot) SetId(v string) { +// SetHref sets field value +func (o *Snapshot) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Snapshot) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Snapshot) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Snapshot) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Snapshot) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshot) GetTypeOk() (*Type, bool) { +func (o *Snapshot) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Snapshot) SetType(v Type) { +// SetId sets field value +func (o *Snapshot) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Snapshot) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Snapshot) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Snapshot) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Snapshot) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshot) GetHrefOk() (*string, bool) { +func (o *Snapshot) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Snapshot) SetHref(v string) { +// SetMetadata sets field value +func (o *Snapshot) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Snapshot) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Snapshot) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *Snapshot) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Snapshot) GetProperties() *SnapshotProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshot) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *Snapshot) GetPropertiesOk() (*SnapshotProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Snapshot) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *Snapshot) SetProperties(v SnapshotProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Snapshot) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Snapshot) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for SnapshotProperties will be returned -func (o *Snapshot) GetProperties() *SnapshotProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Snapshot) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshot) GetPropertiesOk() (*SnapshotProperties, bool) { +func (o *Snapshot) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Snapshot) SetProperties(v SnapshotProperties) { +// SetType sets field value +func (o *Snapshot) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Snapshot) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Snapshot) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Snapshot) HasProperties() bool { func (o Snapshot) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot_properties.go index b42dca20cd54..5eb8cea6e682 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshot_properties.go @@ -16,38 +16,38 @@ import ( // SnapshotProperties struct for SnapshotProperties type SnapshotProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // Human-readable description. - Description *string `json:"description,omitempty"` - // Location of that image/snapshot. - Location *string `json:"location,omitempty"` - // The size of the image in GB. - Size *float32 `json:"size,omitempty"` - // Boolean value representing if the snapshot requires extra protection, such as two-step verification. - SecAuthProtection *bool `json:"secAuthProtection,omitempty"` // Hot-plug capable CPU (no reboot required). CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` // Hot-unplug capable CPU (no reboot required). CpuHotUnplug *bool `json:"cpuHotUnplug,omitempty"` - // Hot-plug capable RAM (no reboot required). - RamHotPlug *bool `json:"ramHotPlug,omitempty"` - // Hot-unplug capable RAM (no reboot required). - RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` - // Hot-plug capable NIC (no reboot required). - NicHotPlug *bool `json:"nicHotPlug,omitempty"` - // Hot-unplug capable NIC (no reboot required). - NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` - // Hot-plug capable Virt-IO drive (no reboot required). - DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` - // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. - DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` + // Human-readable description. + Description *string `json:"description,omitempty"` // Hot-plug capable SCSI drive (no reboot required). DiscScsiHotPlug *bool `json:"discScsiHotPlug,omitempty"` // Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. DiscScsiHotUnplug *bool `json:"discScsiHotUnplug,omitempty"` + // Hot-plug capable Virt-IO drive (no reboot required). + DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` + // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. + DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` // OS type of this snapshot LicenceType *string `json:"licenceType,omitempty"` + // Location of that image/snapshot. + Location *string `json:"location,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` + // Hot-plug capable NIC (no reboot required). + NicHotPlug *bool `json:"nicHotPlug,omitempty"` + // Hot-unplug capable NIC (no reboot required). + NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` + // Hot-plug capable RAM (no reboot required). + RamHotPlug *bool `json:"ramHotPlug,omitempty"` + // Hot-unplug capable RAM (no reboot required). + RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` + // Boolean value representing if the snapshot requires extra protection, such as two-step verification. + SecAuthProtection *bool `json:"secAuthProtection,omitempty"` + // The size of the image in GB. + Size *float32 `json:"size,omitempty"` } // NewSnapshotProperties instantiates a new SnapshotProperties object @@ -68,38 +68,76 @@ func NewSnapshotPropertiesWithDefaults() *SnapshotProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *SnapshotProperties) GetName() *string { +// GetCpuHotPlug returns the CpuHotPlug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetCpuHotPlug() *bool { if o == nil { return nil } - return o.Name + return o.CpuHotPlug } -// GetNameOk returns a tuple with the Name field value +// GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetNameOk() (*string, bool) { +func (o *SnapshotProperties) GetCpuHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Name, true + return o.CpuHotPlug, true } -// SetName sets field value -func (o *SnapshotProperties) SetName(v string) { +// SetCpuHotPlug sets field value +func (o *SnapshotProperties) SetCpuHotPlug(v bool) { - o.Name = &v + o.CpuHotPlug = &v } -// HasName returns a boolean if a field has been set. -func (o *SnapshotProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasCpuHotPlug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasCpuHotPlug() bool { + if o != nil && o.CpuHotPlug != nil { + return true + } + + return false +} + +// GetCpuHotUnplug returns the CpuHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetCpuHotUnplug() *bool { + if o == nil { + return nil + } + + return o.CpuHotUnplug + +} + +// GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SnapshotProperties) GetCpuHotUnplugOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.CpuHotUnplug, true +} + +// SetCpuHotUnplug sets field value +func (o *SnapshotProperties) SetCpuHotUnplug(v bool) { + + o.CpuHotUnplug = &v + +} + +// HasCpuHotUnplug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasCpuHotUnplug() bool { + if o != nil && o.CpuHotUnplug != nil { return true } @@ -107,7 +145,7 @@ func (o *SnapshotProperties) HasName() bool { } // GetDescription returns the Description field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetDescription() *string { if o == nil { return nil @@ -144,266 +182,266 @@ func (o *SnapshotProperties) HasDescription() bool { return false } -// GetLocation returns the Location field value -// If the value is explicit nil, the zero value for string will be returned -func (o *SnapshotProperties) GetLocation() *string { +// GetDiscScsiHotPlug returns the DiscScsiHotPlug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetDiscScsiHotPlug() *bool { if o == nil { return nil } - return o.Location + return o.DiscScsiHotPlug } -// GetLocationOk returns a tuple with the Location field value +// GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetLocationOk() (*string, bool) { +func (o *SnapshotProperties) GetDiscScsiHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Location, true + return o.DiscScsiHotPlug, true } -// SetLocation sets field value -func (o *SnapshotProperties) SetLocation(v string) { +// SetDiscScsiHotPlug sets field value +func (o *SnapshotProperties) SetDiscScsiHotPlug(v bool) { - o.Location = &v + o.DiscScsiHotPlug = &v } -// HasLocation returns a boolean if a field has been set. -func (o *SnapshotProperties) HasLocation() bool { - if o != nil && o.Location != nil { +// HasDiscScsiHotPlug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasDiscScsiHotPlug() bool { + if o != nil && o.DiscScsiHotPlug != nil { return true } return false } -// GetSize returns the Size field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *SnapshotProperties) GetSize() *float32 { +// GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetDiscScsiHotUnplug() *bool { if o == nil { return nil } - return o.Size + return o.DiscScsiHotUnplug } -// GetSizeOk returns a tuple with the Size field value +// GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetSizeOk() (*float32, bool) { +func (o *SnapshotProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Size, true + return o.DiscScsiHotUnplug, true } -// SetSize sets field value -func (o *SnapshotProperties) SetSize(v float32) { +// SetDiscScsiHotUnplug sets field value +func (o *SnapshotProperties) SetDiscScsiHotUnplug(v bool) { - o.Size = &v + o.DiscScsiHotUnplug = &v } -// HasSize returns a boolean if a field has been set. -func (o *SnapshotProperties) HasSize() bool { - if o != nil && o.Size != nil { +// HasDiscScsiHotUnplug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasDiscScsiHotUnplug() bool { + if o != nil && o.DiscScsiHotUnplug != nil { return true } return false } -// GetSecAuthProtection returns the SecAuthProtection field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetSecAuthProtection() *bool { +// GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetDiscVirtioHotPlug() *bool { if o == nil { return nil } - return o.SecAuthProtection + return o.DiscVirtioHotPlug } -// GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value +// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetSecAuthProtectionOk() (*bool, bool) { +func (o *SnapshotProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.SecAuthProtection, true + return o.DiscVirtioHotPlug, true } -// SetSecAuthProtection sets field value -func (o *SnapshotProperties) SetSecAuthProtection(v bool) { +// SetDiscVirtioHotPlug sets field value +func (o *SnapshotProperties) SetDiscVirtioHotPlug(v bool) { - o.SecAuthProtection = &v + o.DiscVirtioHotPlug = &v } -// HasSecAuthProtection returns a boolean if a field has been set. -func (o *SnapshotProperties) HasSecAuthProtection() bool { - if o != nil && o.SecAuthProtection != nil { +// HasDiscVirtioHotPlug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasDiscVirtioHotPlug() bool { + if o != nil && o.DiscVirtioHotPlug != nil { return true } return false } -// GetCpuHotPlug returns the CpuHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetCpuHotPlug() *bool { +// GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetDiscVirtioHotUnplug() *bool { if o == nil { return nil } - return o.CpuHotPlug + return o.DiscVirtioHotUnplug } -// GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value +// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetCpuHotPlugOk() (*bool, bool) { +func (o *SnapshotProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.CpuHotPlug, true + return o.DiscVirtioHotUnplug, true } -// SetCpuHotPlug sets field value -func (o *SnapshotProperties) SetCpuHotPlug(v bool) { +// SetDiscVirtioHotUnplug sets field value +func (o *SnapshotProperties) SetDiscVirtioHotUnplug(v bool) { - o.CpuHotPlug = &v + o.DiscVirtioHotUnplug = &v } -// HasCpuHotPlug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasCpuHotPlug() bool { - if o != nil && o.CpuHotPlug != nil { +// HasDiscVirtioHotUnplug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasDiscVirtioHotUnplug() bool { + if o != nil && o.DiscVirtioHotUnplug != nil { return true } return false } -// GetCpuHotUnplug returns the CpuHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetCpuHotUnplug() *bool { +// GetLicenceType returns the LicenceType field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetLicenceType() *string { if o == nil { return nil } - return o.CpuHotUnplug + return o.LicenceType } -// GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value +// GetLicenceTypeOk returns a tuple with the LicenceType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetCpuHotUnplugOk() (*bool, bool) { +func (o *SnapshotProperties) GetLicenceTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.CpuHotUnplug, true + return o.LicenceType, true } -// SetCpuHotUnplug sets field value -func (o *SnapshotProperties) SetCpuHotUnplug(v bool) { +// SetLicenceType sets field value +func (o *SnapshotProperties) SetLicenceType(v string) { - o.CpuHotUnplug = &v + o.LicenceType = &v } -// HasCpuHotUnplug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasCpuHotUnplug() bool { - if o != nil && o.CpuHotUnplug != nil { +// HasLicenceType returns a boolean if a field has been set. +func (o *SnapshotProperties) HasLicenceType() bool { + if o != nil && o.LicenceType != nil { return true } return false } -// GetRamHotPlug returns the RamHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetRamHotPlug() *bool { +// GetLocation returns the Location field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetLocation() *string { if o == nil { return nil } - return o.RamHotPlug + return o.Location } -// GetRamHotPlugOk returns a tuple with the RamHotPlug field value +// GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetRamHotPlugOk() (*bool, bool) { +func (o *SnapshotProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } - return o.RamHotPlug, true + return o.Location, true } -// SetRamHotPlug sets field value -func (o *SnapshotProperties) SetRamHotPlug(v bool) { +// SetLocation sets field value +func (o *SnapshotProperties) SetLocation(v string) { - o.RamHotPlug = &v + o.Location = &v } -// HasRamHotPlug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasRamHotPlug() bool { - if o != nil && o.RamHotPlug != nil { +// HasLocation returns a boolean if a field has been set. +func (o *SnapshotProperties) HasLocation() bool { + if o != nil && o.Location != nil { return true } return false } -// GetRamHotUnplug returns the RamHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetRamHotUnplug() *bool { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetName() *string { if o == nil { return nil } - return o.RamHotUnplug + return o.Name } -// GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetRamHotUnplugOk() (*bool, bool) { +func (o *SnapshotProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.RamHotUnplug, true + return o.Name, true } -// SetRamHotUnplug sets field value -func (o *SnapshotProperties) SetRamHotUnplug(v bool) { +// SetName sets field value +func (o *SnapshotProperties) SetName(v string) { - o.RamHotUnplug = &v + o.Name = &v } -// HasRamHotUnplug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasRamHotUnplug() bool { - if o != nil && o.RamHotUnplug != nil { +// HasName returns a boolean if a field has been set. +func (o *SnapshotProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -411,7 +449,7 @@ func (o *SnapshotProperties) HasRamHotUnplug() bool { } // GetNicHotPlug returns the NicHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetNicHotPlug() *bool { if o == nil { return nil @@ -449,7 +487,7 @@ func (o *SnapshotProperties) HasNicHotPlug() bool { } // GetNicHotUnplug returns the NicHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetNicHotUnplug() *bool { if o == nil { return nil @@ -486,246 +524,224 @@ func (o *SnapshotProperties) HasNicHotUnplug() bool { return false } -// GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetDiscVirtioHotPlug() *bool { +// GetRamHotPlug returns the RamHotPlug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetRamHotPlug() *bool { if o == nil { return nil } - return o.DiscVirtioHotPlug + return o.RamHotPlug } -// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value +// GetRamHotPlugOk returns a tuple with the RamHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { +func (o *SnapshotProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotPlug, true + return o.RamHotPlug, true } -// SetDiscVirtioHotPlug sets field value -func (o *SnapshotProperties) SetDiscVirtioHotPlug(v bool) { +// SetRamHotPlug sets field value +func (o *SnapshotProperties) SetRamHotPlug(v bool) { - o.DiscVirtioHotPlug = &v + o.RamHotPlug = &v } -// HasDiscVirtioHotPlug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasDiscVirtioHotPlug() bool { - if o != nil && o.DiscVirtioHotPlug != nil { +// HasRamHotPlug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasRamHotPlug() bool { + if o != nil && o.RamHotPlug != nil { return true } return false } -// GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetDiscVirtioHotUnplug() *bool { +// GetRamHotUnplug returns the RamHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetRamHotUnplug() *bool { if o == nil { return nil } - return o.DiscVirtioHotUnplug + return o.RamHotUnplug } -// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value +// GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { +func (o *SnapshotProperties) GetRamHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotUnplug, true + return o.RamHotUnplug, true } -// SetDiscVirtioHotUnplug sets field value -func (o *SnapshotProperties) SetDiscVirtioHotUnplug(v bool) { +// SetRamHotUnplug sets field value +func (o *SnapshotProperties) SetRamHotUnplug(v bool) { - o.DiscVirtioHotUnplug = &v + o.RamHotUnplug = &v } -// HasDiscVirtioHotUnplug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasDiscVirtioHotUnplug() bool { - if o != nil && o.DiscVirtioHotUnplug != nil { +// HasRamHotUnplug returns a boolean if a field has been set. +func (o *SnapshotProperties) HasRamHotUnplug() bool { + if o != nil && o.RamHotUnplug != nil { return true } return false } -// GetDiscScsiHotPlug returns the DiscScsiHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetDiscScsiHotPlug() *bool { +// GetSecAuthProtection returns the SecAuthProtection field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetSecAuthProtection() *bool { if o == nil { return nil } - return o.DiscScsiHotPlug + return o.SecAuthProtection } -// GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value +// GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetDiscScsiHotPlugOk() (*bool, bool) { +func (o *SnapshotProperties) GetSecAuthProtectionOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscScsiHotPlug, true + return o.SecAuthProtection, true } -// SetDiscScsiHotPlug sets field value -func (o *SnapshotProperties) SetDiscScsiHotPlug(v bool) { +// SetSecAuthProtection sets field value +func (o *SnapshotProperties) SetSecAuthProtection(v bool) { - o.DiscScsiHotPlug = &v + o.SecAuthProtection = &v } -// HasDiscScsiHotPlug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasDiscScsiHotPlug() bool { - if o != nil && o.DiscScsiHotPlug != nil { +// HasSecAuthProtection returns a boolean if a field has been set. +func (o *SnapshotProperties) HasSecAuthProtection() bool { + if o != nil && o.SecAuthProtection != nil { return true } return false } -// GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *SnapshotProperties) GetDiscScsiHotUnplug() *bool { +// GetSize returns the Size field value +// If the value is explicit nil, nil is returned +func (o *SnapshotProperties) GetSize() *float32 { if o == nil { return nil } - return o.DiscScsiHotUnplug + return o.Size } -// GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value +// GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { +func (o *SnapshotProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } - return o.DiscScsiHotUnplug, true + return o.Size, true } -// SetDiscScsiHotUnplug sets field value -func (o *SnapshotProperties) SetDiscScsiHotUnplug(v bool) { +// SetSize sets field value +func (o *SnapshotProperties) SetSize(v float32) { - o.DiscScsiHotUnplug = &v + o.Size = &v } -// HasDiscScsiHotUnplug returns a boolean if a field has been set. -func (o *SnapshotProperties) HasDiscScsiHotUnplug() bool { - if o != nil && o.DiscScsiHotUnplug != nil { +// HasSize returns a boolean if a field has been set. +func (o *SnapshotProperties) HasSize() bool { + if o != nil && o.Size != nil { return true } return false } -// GetLicenceType returns the LicenceType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *SnapshotProperties) GetLicenceType() *string { - if o == nil { - return nil +func (o SnapshotProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CpuHotPlug != nil { + toSerialize["cpuHotPlug"] = o.CpuHotPlug } - return o.LicenceType - -} - -// GetLicenceTypeOk returns a tuple with the LicenceType field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SnapshotProperties) GetLicenceTypeOk() (*string, bool) { - if o == nil { - return nil, false + if o.CpuHotUnplug != nil { + toSerialize["cpuHotUnplug"] = o.CpuHotUnplug } - return o.LicenceType, true -} - -// SetLicenceType sets field value -func (o *SnapshotProperties) SetLicenceType(v string) { - - o.LicenceType = &v + if o.Description != nil { + toSerialize["description"] = o.Description + } -} + if o.DiscScsiHotPlug != nil { + toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug + } -// HasLicenceType returns a boolean if a field has been set. -func (o *SnapshotProperties) HasLicenceType() bool { - if o != nil && o.LicenceType != nil { - return true + if o.DiscScsiHotUnplug != nil { + toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug } - return false -} + if o.DiscVirtioHotPlug != nil { + toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug + } -func (o SnapshotProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.DiscVirtioHotUnplug != nil { + toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug } - if o.Description != nil { - toSerialize["description"] = o.Description + + if o.LicenceType != nil { + toSerialize["licenceType"] = o.LicenceType } + if o.Location != nil { toSerialize["location"] = o.Location } - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.SecAuthProtection != nil { - toSerialize["secAuthProtection"] = o.SecAuthProtection - } - if o.CpuHotPlug != nil { - toSerialize["cpuHotPlug"] = o.CpuHotPlug - } - if o.CpuHotUnplug != nil { - toSerialize["cpuHotUnplug"] = o.CpuHotUnplug - } - if o.RamHotPlug != nil { - toSerialize["ramHotPlug"] = o.RamHotPlug - } - if o.RamHotUnplug != nil { - toSerialize["ramHotUnplug"] = o.RamHotUnplug + + if o.Name != nil { + toSerialize["name"] = o.Name } + if o.NicHotPlug != nil { toSerialize["nicHotPlug"] = o.NicHotPlug } + if o.NicHotUnplug != nil { toSerialize["nicHotUnplug"] = o.NicHotUnplug } - if o.DiscVirtioHotPlug != nil { - toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug - } - if o.DiscVirtioHotUnplug != nil { - toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug + + if o.RamHotPlug != nil { + toSerialize["ramHotPlug"] = o.RamHotPlug } - if o.DiscScsiHotPlug != nil { - toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug + + if o.RamHotUnplug != nil { + toSerialize["ramHotUnplug"] = o.RamHotUnplug } - if o.DiscScsiHotUnplug != nil { - toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug + + if o.SecAuthProtection != nil { + toSerialize["secAuthProtection"] = o.SecAuthProtection } - if o.LicenceType != nil { - toSerialize["licenceType"] = o.LicenceType + + if o.Size != nil { + toSerialize["size"] = o.Size } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshots.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshots.go index 8578d03ddaa0..313d03e09272 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshots.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_snapshots.go @@ -16,14 +16,14 @@ import ( // Snapshots struct for Snapshots type Snapshots struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Snapshot `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewSnapshots instantiates a new Snapshots object @@ -44,152 +44,152 @@ func NewSnapshotsWithDefaults() *Snapshots { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Snapshots) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Snapshots) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshots) GetIdOk() (*string, bool) { +func (o *Snapshots) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Snapshots) SetId(v string) { +// SetHref sets field value +func (o *Snapshots) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Snapshots) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Snapshots) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Snapshots) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Snapshots) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshots) GetTypeOk() (*Type, bool) { +func (o *Snapshots) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Snapshots) SetType(v Type) { +// SetId sets field value +func (o *Snapshots) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Snapshots) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Snapshots) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Snapshots) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Snapshots) GetItems() *[]Snapshot { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshots) GetHrefOk() (*string, bool) { +func (o *Snapshots) GetItemsOk() (*[]Snapshot, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Snapshots) SetHref(v string) { +// SetItems sets field value +func (o *Snapshots) SetItems(v []Snapshot) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Snapshots) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Snapshots) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Snapshot will be returned -func (o *Snapshots) GetItems() *[]Snapshot { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Snapshots) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Snapshots) GetItemsOk() (*[]Snapshot, bool) { +func (o *Snapshots) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Snapshots) SetItems(v []Snapshot) { +// SetType sets field value +func (o *Snapshots) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Snapshots) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Snapshots) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Snapshots) HasItems() bool { func (o Snapshots) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group.go new file mode 100644 index 000000000000..cbfb0271f454 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group.go @@ -0,0 +1,298 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroup struct for TargetGroup +type TargetGroup struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` + Properties *TargetGroupProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewTargetGroup instantiates a new TargetGroup 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 NewTargetGroup(properties TargetGroupProperties) *TargetGroup { + this := TargetGroup{} + + this.Properties = &properties + + return &this +} + +// NewTargetGroupWithDefaults instantiates a new TargetGroup 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 NewTargetGroupWithDefaults() *TargetGroup { + this := TargetGroup{} + return &this +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *TargetGroup) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroup) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *TargetGroup) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *TargetGroup) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *TargetGroup) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroup) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *TargetGroup) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *TargetGroup) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *TargetGroup) GetMetadata() *DatacenterElementMetadata { + if o == nil { + return nil + } + + return o.Metadata + +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroup) GetMetadataOk() (*DatacenterElementMetadata, bool) { + if o == nil { + return nil, false + } + + return o.Metadata, true +} + +// SetMetadata sets field value +func (o *TargetGroup) SetMetadata(v DatacenterElementMetadata) { + + o.Metadata = &v + +} + +// HasMetadata returns a boolean if a field has been set. +func (o *TargetGroup) HasMetadata() bool { + if o != nil && o.Metadata != nil { + return true + } + + return false +} + +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *TargetGroup) GetProperties() *TargetGroupProperties { + if o == nil { + return nil + } + + return o.Properties + +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroup) GetPropertiesOk() (*TargetGroupProperties, bool) { + if o == nil { + return nil, false + } + + return o.Properties, true +} + +// SetProperties sets field value +func (o *TargetGroup) SetProperties(v TargetGroupProperties) { + + o.Properties = &v + +} + +// HasProperties returns a boolean if a field has been set. +func (o *TargetGroup) HasProperties() bool { + if o != nil && o.Properties != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *TargetGroup) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroup) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *TargetGroup) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *TargetGroup) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o TargetGroup) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + + if o.Properties != nil { + toSerialize["properties"] = o.Properties + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroup struct { + value *TargetGroup + isSet bool +} + +func (v NullableTargetGroup) Get() *TargetGroup { + return v.value +} + +func (v *NullableTargetGroup) Set(val *TargetGroup) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroup(val *TargetGroup) *NullableTargetGroup { + return &NullableTargetGroup{value: val, isSet: true} +} + +func (v NullableTargetGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_health_check.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_health_check.go new file mode 100644 index 000000000000..70ca3dc637c2 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_health_check.go @@ -0,0 +1,210 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroupHealthCheck struct for TargetGroupHealthCheck +type TargetGroupHealthCheck struct { + // The interval in milliseconds between consecutive health checks; the default value is '2000'. + CheckInterval *int32 `json:"checkInterval,omitempty"` + // The maximum time in milliseconds is to wait for a target to respond to a check. For target VMs with a 'Check Interval' set, the smaller of the two values is used once the TCP connection is established. + CheckTimeout *int32 `json:"checkTimeout,omitempty"` + // The maximum number of attempts to reconnect to a target after a connection failure. The valid range is '0 to 65535'; the default value is '3'. + Retries *int32 `json:"retries,omitempty"` +} + +// NewTargetGroupHealthCheck instantiates a new TargetGroupHealthCheck 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 NewTargetGroupHealthCheck() *TargetGroupHealthCheck { + this := TargetGroupHealthCheck{} + + return &this +} + +// NewTargetGroupHealthCheckWithDefaults instantiates a new TargetGroupHealthCheck 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 NewTargetGroupHealthCheckWithDefaults() *TargetGroupHealthCheck { + this := TargetGroupHealthCheck{} + return &this +} + +// GetCheckInterval returns the CheckInterval field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHealthCheck) GetCheckInterval() *int32 { + if o == nil { + return nil + } + + return o.CheckInterval + +} + +// GetCheckIntervalOk returns a tuple with the CheckInterval field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHealthCheck) GetCheckIntervalOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.CheckInterval, true +} + +// SetCheckInterval sets field value +func (o *TargetGroupHealthCheck) SetCheckInterval(v int32) { + + o.CheckInterval = &v + +} + +// HasCheckInterval returns a boolean if a field has been set. +func (o *TargetGroupHealthCheck) HasCheckInterval() bool { + if o != nil && o.CheckInterval != nil { + return true + } + + return false +} + +// GetCheckTimeout returns the CheckTimeout field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHealthCheck) GetCheckTimeout() *int32 { + if o == nil { + return nil + } + + return o.CheckTimeout + +} + +// GetCheckTimeoutOk returns a tuple with the CheckTimeout field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHealthCheck) GetCheckTimeoutOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.CheckTimeout, true +} + +// SetCheckTimeout sets field value +func (o *TargetGroupHealthCheck) SetCheckTimeout(v int32) { + + o.CheckTimeout = &v + +} + +// HasCheckTimeout returns a boolean if a field has been set. +func (o *TargetGroupHealthCheck) HasCheckTimeout() bool { + if o != nil && o.CheckTimeout != nil { + return true + } + + return false +} + +// GetRetries returns the Retries field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHealthCheck) GetRetries() *int32 { + if o == nil { + return nil + } + + return o.Retries + +} + +// GetRetriesOk returns a tuple with the Retries field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHealthCheck) GetRetriesOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.Retries, true +} + +// SetRetries sets field value +func (o *TargetGroupHealthCheck) SetRetries(v int32) { + + o.Retries = &v + +} + +// HasRetries returns a boolean if a field has been set. +func (o *TargetGroupHealthCheck) HasRetries() bool { + if o != nil && o.Retries != nil { + return true + } + + return false +} + +func (o TargetGroupHealthCheck) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CheckInterval != nil { + toSerialize["checkInterval"] = o.CheckInterval + } + + if o.CheckTimeout != nil { + toSerialize["checkTimeout"] = o.CheckTimeout + } + + if o.Retries != nil { + toSerialize["retries"] = o.Retries + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroupHealthCheck struct { + value *TargetGroupHealthCheck + isSet bool +} + +func (v NullableTargetGroupHealthCheck) Get() *TargetGroupHealthCheck { + return v.value +} + +func (v *NullableTargetGroupHealthCheck) Set(val *TargetGroupHealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroupHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroupHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroupHealthCheck(val *TargetGroupHealthCheck) *NullableTargetGroupHealthCheck { + return &NullableTargetGroupHealthCheck{value: val, isSet: true} +} + +func (v NullableTargetGroupHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroupHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_http_health_check.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_http_health_check.go new file mode 100644 index 000000000000..dc31f49508aa --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_http_health_check.go @@ -0,0 +1,345 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroupHttpHealthCheck struct for TargetGroupHttpHealthCheck +type TargetGroupHttpHealthCheck struct { + // Specify the target's response type to match ALB's request. + MatchType *string `json:"matchType"` + // The method used for the health check request. + Method *string `json:"method,omitempty"` + // Specifies whether to negate an individual entry; the default value is 'FALSE'. + Negate *bool `json:"negate,omitempty"` + // The destination URL for HTTP the health check; the default is '/'. + Path *string `json:"path,omitempty"` + // Specifies whether to use a regular expression to parse the response body; the default value is 'FALSE'. By using regular expressions, you can flexibly customize the expected response from a healthy server. + Regex *bool `json:"regex,omitempty"` + // The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'. + Response *string `json:"response"` +} + +// NewTargetGroupHttpHealthCheck instantiates a new TargetGroupHttpHealthCheck 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 NewTargetGroupHttpHealthCheck(matchType string, response string) *TargetGroupHttpHealthCheck { + this := TargetGroupHttpHealthCheck{} + + this.MatchType = &matchType + this.Response = &response + + return &this +} + +// NewTargetGroupHttpHealthCheckWithDefaults instantiates a new TargetGroupHttpHealthCheck 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 NewTargetGroupHttpHealthCheckWithDefaults() *TargetGroupHttpHealthCheck { + this := TargetGroupHttpHealthCheck{} + return &this +} + +// GetMatchType returns the MatchType field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHttpHealthCheck) GetMatchType() *string { + if o == nil { + return nil + } + + return o.MatchType + +} + +// GetMatchTypeOk returns a tuple with the MatchType field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHttpHealthCheck) GetMatchTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.MatchType, true +} + +// SetMatchType sets field value +func (o *TargetGroupHttpHealthCheck) SetMatchType(v string) { + + o.MatchType = &v + +} + +// HasMatchType returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasMatchType() bool { + if o != nil && o.MatchType != nil { + return true + } + + return false +} + +// GetMethod returns the Method field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHttpHealthCheck) GetMethod() *string { + if o == nil { + return nil + } + + return o.Method + +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHttpHealthCheck) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Method, true +} + +// SetMethod sets field value +func (o *TargetGroupHttpHealthCheck) SetMethod(v string) { + + o.Method = &v + +} + +// HasMethod returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasMethod() bool { + if o != nil && o.Method != nil { + return true + } + + return false +} + +// GetNegate returns the Negate field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHttpHealthCheck) GetNegate() *bool { + if o == nil { + return nil + } + + return o.Negate + +} + +// GetNegateOk returns a tuple with the Negate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHttpHealthCheck) GetNegateOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.Negate, true +} + +// SetNegate sets field value +func (o *TargetGroupHttpHealthCheck) SetNegate(v bool) { + + o.Negate = &v + +} + +// HasNegate returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasNegate() bool { + if o != nil && o.Negate != nil { + return true + } + + return false +} + +// GetPath returns the Path field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHttpHealthCheck) GetPath() *string { + if o == nil { + return nil + } + + return o.Path + +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHttpHealthCheck) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Path, true +} + +// SetPath sets field value +func (o *TargetGroupHttpHealthCheck) SetPath(v string) { + + o.Path = &v + +} + +// HasPath returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasPath() bool { + if o != nil && o.Path != nil { + return true + } + + return false +} + +// GetRegex returns the Regex field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHttpHealthCheck) GetRegex() *bool { + if o == nil { + return nil + } + + return o.Regex + +} + +// GetRegexOk returns a tuple with the Regex field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHttpHealthCheck) GetRegexOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.Regex, true +} + +// SetRegex sets field value +func (o *TargetGroupHttpHealthCheck) SetRegex(v bool) { + + o.Regex = &v + +} + +// HasRegex returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasRegex() bool { + if o != nil && o.Regex != nil { + return true + } + + return false +} + +// GetResponse returns the Response field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupHttpHealthCheck) GetResponse() *string { + if o == nil { + return nil + } + + return o.Response + +} + +// GetResponseOk returns a tuple with the Response field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupHttpHealthCheck) GetResponseOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Response, true +} + +// SetResponse sets field value +func (o *TargetGroupHttpHealthCheck) SetResponse(v string) { + + o.Response = &v + +} + +// HasResponse returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasResponse() bool { + if o != nil && o.Response != nil { + return true + } + + return false +} + +func (o TargetGroupHttpHealthCheck) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MatchType != nil { + toSerialize["matchType"] = o.MatchType + } + + if o.Method != nil { + toSerialize["method"] = o.Method + } + + if o.Negate != nil { + toSerialize["negate"] = o.Negate + } + + if o.Path != nil { + toSerialize["path"] = o.Path + } + + if o.Regex != nil { + toSerialize["regex"] = o.Regex + } + + if o.Response != nil { + toSerialize["response"] = o.Response + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroupHttpHealthCheck struct { + value *TargetGroupHttpHealthCheck + isSet bool +} + +func (v NullableTargetGroupHttpHealthCheck) Get() *TargetGroupHttpHealthCheck { + return v.value +} + +func (v *NullableTargetGroupHttpHealthCheck) Set(val *TargetGroupHttpHealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroupHttpHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroupHttpHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroupHttpHealthCheck(val *TargetGroupHttpHealthCheck) *NullableTargetGroupHttpHealthCheck { + return &NullableTargetGroupHttpHealthCheck{value: val, isSet: true} +} + +func (v NullableTargetGroupHttpHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroupHttpHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_properties.go new file mode 100644 index 000000000000..f14f3486fb56 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_properties.go @@ -0,0 +1,344 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroupProperties struct for TargetGroupProperties +type TargetGroupProperties struct { + // The balancing algorithm. A balancing algorithm consists of predefined rules with the logic that a load balancer uses to distribute network traffic between servers. - **Round Robin**: Targets are served alternately according to their weighting. - **Least Connection**: The target with the least active connection is served. - **Random**: The targets are served based on a consistent pseudorandom algorithm. - **Source IP**: It is ensured that the same client IP address reaches the same target. + Algorithm *string `json:"algorithm"` + HealthCheck *TargetGroupHealthCheck `json:"healthCheck,omitempty"` + HttpHealthCheck *TargetGroupHttpHealthCheck `json:"httpHealthCheck,omitempty"` + // The target group name. + Name *string `json:"name"` + // The forwarding protocol. Only the value 'HTTP' is allowed. + Protocol *string `json:"protocol"` + // Array of items in the collection. + Targets *[]TargetGroupTarget `json:"targets,omitempty"` +} + +// NewTargetGroupProperties instantiates a new TargetGroupProperties 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 NewTargetGroupProperties(algorithm string, name string, protocol string) *TargetGroupProperties { + this := TargetGroupProperties{} + + this.Algorithm = &algorithm + this.Name = &name + this.Protocol = &protocol + + return &this +} + +// NewTargetGroupPropertiesWithDefaults instantiates a new TargetGroupProperties 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 NewTargetGroupPropertiesWithDefaults() *TargetGroupProperties { + this := TargetGroupProperties{} + return &this +} + +// GetAlgorithm returns the Algorithm field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupProperties) GetAlgorithm() *string { + if o == nil { + return nil + } + + return o.Algorithm + +} + +// GetAlgorithmOk returns a tuple with the Algorithm field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupProperties) GetAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Algorithm, true +} + +// SetAlgorithm sets field value +func (o *TargetGroupProperties) SetAlgorithm(v string) { + + o.Algorithm = &v + +} + +// HasAlgorithm returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasAlgorithm() bool { + if o != nil && o.Algorithm != nil { + return true + } + + return false +} + +// GetHealthCheck returns the HealthCheck field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupProperties) GetHealthCheck() *TargetGroupHealthCheck { + if o == nil { + return nil + } + + return o.HealthCheck + +} + +// GetHealthCheckOk returns a tuple with the HealthCheck field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupProperties) GetHealthCheckOk() (*TargetGroupHealthCheck, bool) { + if o == nil { + return nil, false + } + + return o.HealthCheck, true +} + +// SetHealthCheck sets field value +func (o *TargetGroupProperties) SetHealthCheck(v TargetGroupHealthCheck) { + + o.HealthCheck = &v + +} + +// HasHealthCheck returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasHealthCheck() bool { + if o != nil && o.HealthCheck != nil { + return true + } + + return false +} + +// GetHttpHealthCheck returns the HttpHealthCheck field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupProperties) GetHttpHealthCheck() *TargetGroupHttpHealthCheck { + if o == nil { + return nil + } + + return o.HttpHealthCheck + +} + +// GetHttpHealthCheckOk returns a tuple with the HttpHealthCheck field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupProperties) GetHttpHealthCheckOk() (*TargetGroupHttpHealthCheck, bool) { + if o == nil { + return nil, false + } + + return o.HttpHealthCheck, true +} + +// SetHttpHealthCheck sets field value +func (o *TargetGroupProperties) SetHttpHealthCheck(v TargetGroupHttpHealthCheck) { + + o.HttpHealthCheck = &v + +} + +// HasHttpHealthCheck returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasHttpHealthCheck() bool { + if o != nil && o.HttpHealthCheck != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupProperties) GetName() *string { + if o == nil { + return nil + } + + return o.Name + +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Name, true +} + +// SetName sets field value +func (o *TargetGroupProperties) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// GetProtocol returns the Protocol field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupProperties) GetProtocol() *string { + if o == nil { + return nil + } + + return o.Protocol + +} + +// GetProtocolOk returns a tuple with the Protocol field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupProperties) GetProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Protocol, true +} + +// SetProtocol sets field value +func (o *TargetGroupProperties) SetProtocol(v string) { + + o.Protocol = &v + +} + +// HasProtocol returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasProtocol() bool { + if o != nil && o.Protocol != nil { + return true + } + + return false +} + +// GetTargets returns the Targets field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupProperties) GetTargets() *[]TargetGroupTarget { + if o == nil { + return nil + } + + return o.Targets + +} + +// GetTargetsOk returns a tuple with the Targets field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupProperties) GetTargetsOk() (*[]TargetGroupTarget, bool) { + if o == nil { + return nil, false + } + + return o.Targets, true +} + +// SetTargets sets field value +func (o *TargetGroupProperties) SetTargets(v []TargetGroupTarget) { + + o.Targets = &v + +} + +// HasTargets returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasTargets() bool { + if o != nil && o.Targets != nil { + return true + } + + return false +} + +func (o TargetGroupProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Algorithm != nil { + toSerialize["algorithm"] = o.Algorithm + } + + if o.HealthCheck != nil { + toSerialize["healthCheck"] = o.HealthCheck + } + + if o.HttpHealthCheck != nil { + toSerialize["httpHealthCheck"] = o.HttpHealthCheck + } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + + if o.Protocol != nil { + toSerialize["protocol"] = o.Protocol + } + + if o.Targets != nil { + toSerialize["targets"] = o.Targets + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroupProperties struct { + value *TargetGroupProperties + isSet bool +} + +func (v NullableTargetGroupProperties) Get() *TargetGroupProperties { + return v.value +} + +func (v *NullableTargetGroupProperties) Set(val *TargetGroupProperties) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroupProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroupProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroupProperties(val *TargetGroupProperties) *NullableTargetGroupProperties { + return &NullableTargetGroupProperties{value: val, isSet: true} +} + +func (v NullableTargetGroupProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroupProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_put.go new file mode 100644 index 000000000000..b5f93b5652f3 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_put.go @@ -0,0 +1,255 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroupPut struct for TargetGroupPut +type TargetGroupPut struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + Properties *TargetGroupProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewTargetGroupPut instantiates a new TargetGroupPut 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 NewTargetGroupPut(properties TargetGroupProperties) *TargetGroupPut { + this := TargetGroupPut{} + + this.Properties = &properties + + return &this +} + +// NewTargetGroupPutWithDefaults instantiates a new TargetGroupPut 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 NewTargetGroupPutWithDefaults() *TargetGroupPut { + this := TargetGroupPut{} + return &this +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupPut) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupPut) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *TargetGroupPut) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *TargetGroupPut) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupPut) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupPut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *TargetGroupPut) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *TargetGroupPut) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupPut) GetProperties() *TargetGroupProperties { + if o == nil { + return nil + } + + return o.Properties + +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupPut) GetPropertiesOk() (*TargetGroupProperties, bool) { + if o == nil { + return nil, false + } + + return o.Properties, true +} + +// SetProperties sets field value +func (o *TargetGroupPut) SetProperties(v TargetGroupProperties) { + + o.Properties = &v + +} + +// HasProperties returns a boolean if a field has been set. +func (o *TargetGroupPut) HasProperties() bool { + if o != nil && o.Properties != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupPut) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupPut) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *TargetGroupPut) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *TargetGroupPut) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o TargetGroupPut) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Properties != nil { + toSerialize["properties"] = o.Properties + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroupPut struct { + value *TargetGroupPut + isSet bool +} + +func (v NullableTargetGroupPut) Get() *TargetGroupPut { + return v.value +} + +func (v *NullableTargetGroupPut) Set(val *TargetGroupPut) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroupPut) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroupPut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroupPut(val *TargetGroupPut) *NullableTargetGroupPut { + return &NullableTargetGroupPut{value: val, isSet: true} +} + +func (v NullableTargetGroupPut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroupPut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_target.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_target.go new file mode 100644 index 000000000000..6681dd257b23 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_group_target.go @@ -0,0 +1,350 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroupTarget struct for TargetGroupTarget +type TargetGroupTarget struct { + // When the health check is enabled, the target is available only when it accepts regular TCP or HTTP connection attempts for state checking. The state check consists of one connection attempt with the target's address and port. The default value is 'TRUE'. + HealthCheckEnabled *bool `json:"healthCheckEnabled,omitempty"` + // The IP address of the balanced target. + Ip *string `json:"ip"` + // When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'. + MaintenanceEnabled *bool `json:"maintenanceEnabled,omitempty"` + // The port of the balanced target service; the valid range is 1 to 65535. + Port *int32 `json:"port"` + // The traffic is distributed proportionally to target weight, which is the ratio of the total weight of all targets. A target with higher weight receives a larger share of traffic. The valid range is from 0 to 256; the default value is '1'. Targets with a weight of '0' do not participate in load balancing but still accept persistent connections. We recommend using values in the middle range to leave room for later adjustments. + Weight *int32 `json:"weight"` + // ProxyProtocol is used to set the proxy protocol version. + ProxyProtocol *string `json:"proxyProtocol,omitempty"` +} + +// NewTargetGroupTarget instantiates a new TargetGroupTarget 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 NewTargetGroupTarget(ip string, port int32, weight int32) *TargetGroupTarget { + this := TargetGroupTarget{} + + this.Ip = &ip + this.Port = &port + this.Weight = &weight + var proxyProtocol string = "none" + this.ProxyProtocol = &proxyProtocol + + return &this +} + +// NewTargetGroupTargetWithDefaults instantiates a new TargetGroupTarget 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 NewTargetGroupTargetWithDefaults() *TargetGroupTarget { + this := TargetGroupTarget{} + var proxyProtocol string = "none" + this.ProxyProtocol = &proxyProtocol + return &this +} + +// GetHealthCheckEnabled returns the HealthCheckEnabled field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupTarget) GetHealthCheckEnabled() *bool { + if o == nil { + return nil + } + + return o.HealthCheckEnabled + +} + +// GetHealthCheckEnabledOk returns a tuple with the HealthCheckEnabled field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupTarget) GetHealthCheckEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.HealthCheckEnabled, true +} + +// SetHealthCheckEnabled sets field value +func (o *TargetGroupTarget) SetHealthCheckEnabled(v bool) { + + o.HealthCheckEnabled = &v + +} + +// HasHealthCheckEnabled returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasHealthCheckEnabled() bool { + if o != nil && o.HealthCheckEnabled != nil { + return true + } + + return false +} + +// GetIp returns the Ip field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupTarget) GetIp() *string { + if o == nil { + return nil + } + + return o.Ip + +} + +// GetIpOk returns a tuple with the Ip field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupTarget) GetIpOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Ip, true +} + +// SetIp sets field value +func (o *TargetGroupTarget) SetIp(v string) { + + o.Ip = &v + +} + +// HasIp returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasIp() bool { + if o != nil && o.Ip != nil { + return true + } + + return false +} + +// GetMaintenanceEnabled returns the MaintenanceEnabled field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupTarget) GetMaintenanceEnabled() *bool { + if o == nil { + return nil + } + + return o.MaintenanceEnabled + +} + +// GetMaintenanceEnabledOk returns a tuple with the MaintenanceEnabled field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupTarget) GetMaintenanceEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.MaintenanceEnabled, true +} + +// SetMaintenanceEnabled sets field value +func (o *TargetGroupTarget) SetMaintenanceEnabled(v bool) { + + o.MaintenanceEnabled = &v + +} + +// HasMaintenanceEnabled returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasMaintenanceEnabled() bool { + if o != nil && o.MaintenanceEnabled != nil { + return true + } + + return false +} + +// GetPort returns the Port field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupTarget) GetPort() *int32 { + if o == nil { + return nil + } + + return o.Port + +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupTarget) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.Port, true +} + +// SetPort sets field value +func (o *TargetGroupTarget) SetPort(v int32) { + + o.Port = &v + +} + +// HasPort returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasPort() bool { + if o != nil && o.Port != nil { + return true + } + + return false +} + +// GetWeight returns the Weight field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupTarget) GetWeight() *int32 { + if o == nil { + return nil + } + + return o.Weight + +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupTarget) GetWeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + + return o.Weight, true +} + +// SetWeight sets field value +func (o *TargetGroupTarget) SetWeight(v int32) { + + o.Weight = &v + +} + +// HasWeight returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasWeight() bool { + if o != nil && o.Weight != nil { + return true + } + + return false +} + +// GetProxyProtocol returns the ProxyProtocol field value +// If the value is explicit nil, nil is returned +func (o *TargetGroupTarget) GetProxyProtocol() *string { + if o == nil { + return nil + } + + return o.ProxyProtocol + +} + +// GetProxyProtocolOk returns a tuple with the ProxyProtocol field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroupTarget) GetProxyProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.ProxyProtocol, true +} + +// SetProxyProtocol sets field value +func (o *TargetGroupTarget) SetProxyProtocol(v string) { + + o.ProxyProtocol = &v + +} + +// HasProxyProtocol returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasProxyProtocol() bool { + if o != nil && o.ProxyProtocol != nil { + return true + } + + return false +} + +func (o TargetGroupTarget) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.HealthCheckEnabled != nil { + toSerialize["healthCheckEnabled"] = o.HealthCheckEnabled + } + + if o.Ip != nil { + toSerialize["ip"] = o.Ip + } + + if o.MaintenanceEnabled != nil { + toSerialize["maintenanceEnabled"] = o.MaintenanceEnabled + } + + if o.Port != nil { + toSerialize["port"] = o.Port + } + + if o.Weight != nil { + toSerialize["weight"] = o.Weight + } + + if o.ProxyProtocol != nil { + toSerialize["proxyProtocol"] = o.ProxyProtocol + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroupTarget struct { + value *TargetGroupTarget + isSet bool +} + +func (v NullableTargetGroupTarget) Get() *TargetGroupTarget { + return v.value +} + +func (v *NullableTargetGroupTarget) Set(val *TargetGroupTarget) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroupTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroupTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroupTarget(val *TargetGroupTarget) *NullableTargetGroupTarget { + return &NullableTargetGroupTarget{value: val, isSet: true} +} + +func (v NullableTargetGroupTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroupTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_groups.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_groups.go new file mode 100644 index 000000000000..521ca7b3fa37 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_groups.go @@ -0,0 +1,385 @@ +/* + * CLOUD API + * + * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. + * + * API version: 6.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" +) + +// TargetGroups struct for TargetGroups +type TargetGroups struct { + Links *PaginationLinks `json:"_links,omitempty"` + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` + // Array of items in the collection. + Items *[]TargetGroup `json:"items,omitempty"` + // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). + Limit *float32 `json:"limit,omitempty"` + // The offset, specified in the request (if not is specified, 0 is used by default). + Offset *float32 `json:"offset,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` +} + +// NewTargetGroups instantiates a new TargetGroups 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 NewTargetGroups() *TargetGroups { + this := TargetGroups{} + + return &this +} + +// NewTargetGroupsWithDefaults instantiates a new TargetGroups 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 NewTargetGroupsWithDefaults() *TargetGroups { + this := TargetGroups{} + return &this +} + +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetLinks() *PaginationLinks { + if o == nil { + return nil + } + + return o.Links + +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetLinksOk() (*PaginationLinks, bool) { + if o == nil { + return nil, false + } + + return o.Links, true +} + +// SetLinks sets field value +func (o *TargetGroups) SetLinks(v PaginationLinks) { + + o.Links = &v + +} + +// HasLinks returns a boolean if a field has been set. +func (o *TargetGroups) HasLinks() bool { + if o != nil && o.Links != nil { + return true + } + + return false +} + +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetHref() *string { + if o == nil { + return nil + } + + return o.Href + +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Href, true +} + +// SetHref sets field value +func (o *TargetGroups) SetHref(v string) { + + o.Href = &v + +} + +// HasHref returns a boolean if a field has been set. +func (o *TargetGroups) HasHref() bool { + if o != nil && o.Href != nil { + return true + } + + return false +} + +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetId() *string { + if o == nil { + return nil + } + + return o.Id + +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.Id, true +} + +// SetId sets field value +func (o *TargetGroups) SetId(v string) { + + o.Id = &v + +} + +// HasId returns a boolean if a field has been set. +func (o *TargetGroups) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetItems() *[]TargetGroup { + if o == nil { + return nil + } + + return o.Items + +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetItemsOk() (*[]TargetGroup, bool) { + if o == nil { + return nil, false + } + + return o.Items, true +} + +// SetItems sets field value +func (o *TargetGroups) SetItems(v []TargetGroup) { + + o.Items = &v + +} + +// HasItems returns a boolean if a field has been set. +func (o *TargetGroups) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetLimit() *float32 { + if o == nil { + return nil + } + + return o.Limit + +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetLimitOk() (*float32, bool) { + if o == nil { + return nil, false + } + + return o.Limit, true +} + +// SetLimit sets field value +func (o *TargetGroups) SetLimit(v float32) { + + o.Limit = &v + +} + +// HasLimit returns a boolean if a field has been set. +func (o *TargetGroups) HasLimit() bool { + if o != nil && o.Limit != nil { + return true + } + + return false +} + +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetOffset() *float32 { + if o == nil { + return nil + } + + return o.Offset + +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetOffsetOk() (*float32, bool) { + if o == nil { + return nil, false + } + + return o.Offset, true +} + +// SetOffset sets field value +func (o *TargetGroups) SetOffset(v float32) { + + o.Offset = &v + +} + +// HasOffset returns a boolean if a field has been set. +func (o *TargetGroups) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *TargetGroups) GetType() *Type { + if o == nil { + return nil + } + + return o.Type + +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TargetGroups) GetTypeOk() (*Type, bool) { + if o == nil { + return nil, false + } + + return o.Type, true +} + +// SetType sets field value +func (o *TargetGroups) SetType(v Type) { + + o.Type = &v + +} + +// HasType returns a boolean if a field has been set. +func (o *TargetGroups) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +func (o TargetGroups) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Links != nil { + toSerialize["_links"] = o.Links + } + + if o.Href != nil { + toSerialize["href"] = o.Href + } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + + if o.Items != nil { + toSerialize["items"] = o.Items + } + + if o.Limit != nil { + toSerialize["limit"] = o.Limit + } + + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + + return json.Marshal(toSerialize) +} + +type NullableTargetGroups struct { + value *TargetGroups + isSet bool +} + +func (v NullableTargetGroups) Get() *TargetGroups { + return v.value +} + +func (v *NullableTargetGroups) Set(val *TargetGroups) { + v.value = val + v.isSet = true +} + +func (v NullableTargetGroups) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetGroups) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetGroups(val *TargetGroups) *NullableTargetGroups { + return &NullableTargetGroups{value: val, isSet: true} +} + +func (v NullableTargetGroups) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetGroups) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_port_range.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_port_range.go index 9a1c39ea528f..8c5281ed8a92 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_port_range.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_target_port_range.go @@ -16,10 +16,10 @@ import ( // TargetPortRange struct for TargetPortRange type TargetPortRange struct { - // Target port range start associated with the NAT Gateway rule. - Start *int32 `json:"start,omitempty"` // Target port range end associated with the NAT Gateway rule. End *int32 `json:"end,omitempty"` + // Target port range start associated with the NAT Gateway rule. + Start *int32 `json:"start,omitempty"` } // NewTargetPortRange instantiates a new TargetPortRange object @@ -40,76 +40,76 @@ func NewTargetPortRangeWithDefaults() *TargetPortRange { return &this } -// GetStart returns the Start field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TargetPortRange) GetStart() *int32 { +// GetEnd returns the End field value +// If the value is explicit nil, nil is returned +func (o *TargetPortRange) GetEnd() *int32 { if o == nil { return nil } - return o.Start + return o.End } -// GetStartOk returns a tuple with the Start field value +// GetEndOk returns a tuple with the End field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TargetPortRange) GetStartOk() (*int32, bool) { +func (o *TargetPortRange) GetEndOk() (*int32, bool) { if o == nil { return nil, false } - return o.Start, true + return o.End, true } -// SetStart sets field value -func (o *TargetPortRange) SetStart(v int32) { +// SetEnd sets field value +func (o *TargetPortRange) SetEnd(v int32) { - o.Start = &v + o.End = &v } -// HasStart returns a boolean if a field has been set. -func (o *TargetPortRange) HasStart() bool { - if o != nil && o.Start != nil { +// HasEnd returns a boolean if a field has been set. +func (o *TargetPortRange) HasEnd() bool { + if o != nil && o.End != nil { return true } return false } -// GetEnd returns the End field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TargetPortRange) GetEnd() *int32 { +// GetStart returns the Start field value +// If the value is explicit nil, nil is returned +func (o *TargetPortRange) GetStart() *int32 { if o == nil { return nil } - return o.End + return o.Start } -// GetEndOk returns a tuple with the End field value +// GetStartOk returns a tuple with the Start field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TargetPortRange) GetEndOk() (*int32, bool) { +func (o *TargetPortRange) GetStartOk() (*int32, bool) { if o == nil { return nil, false } - return o.End, true + return o.Start, true } -// SetEnd sets field value -func (o *TargetPortRange) SetEnd(v int32) { +// SetStart sets field value +func (o *TargetPortRange) SetStart(v int32) { - o.End = &v + o.Start = &v } -// HasEnd returns a boolean if a field has been set. -func (o *TargetPortRange) HasEnd() bool { - if o != nil && o.End != nil { +// HasStart returns a boolean if a field has been set. +func (o *TargetPortRange) HasStart() bool { + if o != nil && o.Start != nil { return true } @@ -118,12 +118,14 @@ func (o *TargetPortRange) HasEnd() bool { func (o TargetPortRange) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Start != nil { - toSerialize["start"] = o.Start - } if o.End != nil { toSerialize["end"] = o.End } + + if o.Start != nil { + toSerialize["start"] = o.Start + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template.go index 709587e91005..ad290d4090bf 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template.go @@ -16,14 +16,14 @@ import ( // Template struct for Template type Template struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *TemplateProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewTemplate instantiates a new Template object @@ -46,190 +46,190 @@ func NewTemplateWithDefaults() *Template { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Template) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Template) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Template) GetIdOk() (*string, bool) { +func (o *Template) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Template) SetId(v string) { +// SetHref sets field value +func (o *Template) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Template) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Template) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Template) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Template) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Template) GetTypeOk() (*Type, bool) { +func (o *Template) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Template) SetType(v Type) { +// SetId sets field value +func (o *Template) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Template) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Template) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Template) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Template) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Template) GetHrefOk() (*string, bool) { +func (o *Template) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Template) SetHref(v string) { +// SetMetadata sets field value +func (o *Template) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Template) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Template) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *Template) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Template) GetProperties() *TemplateProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Template) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *Template) GetPropertiesOk() (*TemplateProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Template) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *Template) SetProperties(v TemplateProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Template) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Template) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for TemplateProperties will be returned -func (o *Template) GetProperties() *TemplateProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Template) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Template) GetPropertiesOk() (*TemplateProperties, bool) { +func (o *Template) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Template) SetProperties(v TemplateProperties) { +// SetType sets field value +func (o *Template) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Template) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Template) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Template) HasProperties() bool { func (o Template) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template_properties.go index 4784c61023a5..98d1150116a8 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_template_properties.go @@ -16,10 +16,10 @@ import ( // TemplateProperties struct for TemplateProperties type TemplateProperties struct { - // The name of the resource. - Name *string `json:"name"` // The CPU cores count. Cores *float32 `json:"cores"` + // The resource name. + Name *string `json:"name"` // The RAM size in MB. Ram *float32 `json:"ram"` // The storage size in GB. @@ -30,11 +30,11 @@ type TemplateProperties struct { // 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 NewTemplateProperties(name string, cores float32, ram float32, storageSize float32) *TemplateProperties { +func NewTemplateProperties(cores float32, name string, ram float32, storageSize float32) *TemplateProperties { this := TemplateProperties{} - this.Name = &name this.Cores = &cores + this.Name = &name this.Ram = &ram this.StorageSize = &storageSize @@ -49,76 +49,76 @@ func NewTemplatePropertiesWithDefaults() *TemplateProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TemplateProperties) GetName() *string { +// GetCores returns the Cores field value +// If the value is explicit nil, nil is returned +func (o *TemplateProperties) GetCores() *float32 { if o == nil { return nil } - return o.Name + return o.Cores } -// GetNameOk returns a tuple with the Name field value +// GetCoresOk returns a tuple with the Cores field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TemplateProperties) GetNameOk() (*string, bool) { +func (o *TemplateProperties) GetCoresOk() (*float32, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Cores, true } -// SetName sets field value -func (o *TemplateProperties) SetName(v string) { +// SetCores sets field value +func (o *TemplateProperties) SetCores(v float32) { - o.Name = &v + o.Cores = &v } -// HasName returns a boolean if a field has been set. -func (o *TemplateProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasCores returns a boolean if a field has been set. +func (o *TemplateProperties) HasCores() bool { + if o != nil && o.Cores != nil { return true } return false } -// GetCores returns the Cores field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *TemplateProperties) GetCores() *float32 { +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *TemplateProperties) GetName() *string { if o == nil { return nil } - return o.Cores + return o.Name } -// GetCoresOk returns a tuple with the Cores field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TemplateProperties) GetCoresOk() (*float32, bool) { +func (o *TemplateProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Cores, true + return o.Name, true } -// SetCores sets field value -func (o *TemplateProperties) SetCores(v float32) { +// SetName sets field value +func (o *TemplateProperties) SetName(v string) { - o.Cores = &v + o.Name = &v } -// HasCores returns a boolean if a field has been set. -func (o *TemplateProperties) HasCores() bool { - if o != nil && o.Cores != nil { +// HasName returns a boolean if a field has been set. +func (o *TemplateProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -126,7 +126,7 @@ func (o *TemplateProperties) HasCores() bool { } // GetRam returns the Ram field value -// If the value is explicit nil, the zero value for float32 will be returned +// If the value is explicit nil, nil is returned func (o *TemplateProperties) GetRam() *float32 { if o == nil { return nil @@ -164,7 +164,7 @@ func (o *TemplateProperties) HasRam() bool { } // GetStorageSize returns the StorageSize field value -// If the value is explicit nil, the zero value for float32 will be returned +// If the value is explicit nil, nil is returned func (o *TemplateProperties) GetStorageSize() *float32 { if o == nil { return nil @@ -203,18 +203,22 @@ func (o *TemplateProperties) HasStorageSize() bool { func (o TemplateProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } if o.Cores != nil { toSerialize["cores"] = o.Cores } + + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Ram != nil { toSerialize["ram"] = o.Ram } + if o.StorageSize != nil { toSerialize["storageSize"] = o.StorageSize } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_templates.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_templates.go index d849d16c2323..c66eac10cc6a 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_templates.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_templates.go @@ -16,14 +16,14 @@ import ( // Templates struct for Templates type Templates struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Template `json:"items,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewTemplates instantiates a new Templates object @@ -44,152 +44,152 @@ func NewTemplatesWithDefaults() *Templates { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Templates) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Templates) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Templates) GetIdOk() (*string, bool) { +func (o *Templates) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Templates) SetId(v string) { +// SetHref sets field value +func (o *Templates) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Templates) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Templates) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Templates) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Templates) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Templates) GetTypeOk() (*Type, bool) { +func (o *Templates) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Templates) SetType(v Type) { +// SetId sets field value +func (o *Templates) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Templates) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Templates) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Templates) GetHref() *string { +// GetItems returns the Items field value +// If the value is explicit nil, nil is returned +func (o *Templates) GetItems() *[]Template { if o == nil { return nil } - return o.Href + return o.Items } -// GetHrefOk returns a tuple with the Href field value +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Templates) GetHrefOk() (*string, bool) { +func (o *Templates) GetItemsOk() (*[]Template, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Items, true } -// SetHref sets field value -func (o *Templates) SetHref(v string) { +// SetItems sets field value +func (o *Templates) SetItems(v []Template) { - o.Href = &v + o.Items = &v } -// HasHref returns a boolean if a field has been set. -func (o *Templates) HasHref() bool { - if o != nil && o.Href != nil { +// HasItems returns a boolean if a field has been set. +func (o *Templates) HasItems() bool { + if o != nil && o.Items != nil { return true } return false } -// GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Template will be returned -func (o *Templates) GetItems() *[]Template { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Templates) GetType() *Type { if o == nil { return nil } - return o.Items + return o.Type } -// GetItemsOk returns a tuple with the Items field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Templates) GetItemsOk() (*[]Template, bool) { +func (o *Templates) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Items, true + return o.Type, true } -// SetItems sets field value -func (o *Templates) SetItems(v []Template) { +// SetType sets field value +func (o *Templates) SetType(v Type) { - o.Items = &v + o.Type = &v } -// HasItems returns a boolean if a field has been set. -func (o *Templates) HasItems() bool { - if o != nil && o.Items != nil { +// HasType returns a boolean if a field has been set. +func (o *Templates) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -198,18 +198,22 @@ func (o *Templates) HasItems() bool { func (o Templates) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_token.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_token.go index 074e07ad6730..c886b2680735 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_token.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_token.go @@ -39,7 +39,7 @@ func NewTokenWithDefaults() *Token { } // GetToken returns the Token field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *Token) GetToken() *string { if o == nil { return nil @@ -81,6 +81,7 @@ func (o Token) MarshalJSON() ([]byte, error) { if o.Token != nil { toSerialize["token"] = o.Token } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user.go index 14864be690f8..38d1a9b063dd 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user.go @@ -16,15 +16,15 @@ import ( // User struct for User type User struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Entities *UsersEntities `json:"entities,omitempty"` // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` Metadata *UserMetadata `json:"metadata,omitempty"` Properties *UserProperties `json:"properties"` - Entities *UsersEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewUser instantiates a new User object @@ -47,114 +47,114 @@ func NewUserWithDefaults() *User { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *User) GetId() *string { +// GetEntities returns the Entities field value +// If the value is explicit nil, nil is returned +func (o *User) GetEntities() *UsersEntities { if o == nil { return nil } - return o.Id + return o.Entities } -// GetIdOk returns a tuple with the Id field value +// GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *User) GetIdOk() (*string, bool) { +func (o *User) GetEntitiesOk() (*UsersEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *User) SetId(v string) { +// SetEntities sets field value +func (o *User) SetEntities(v UsersEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *User) HasId() bool { - if o != nil && o.Id != nil { +// HasEntities returns a boolean if a field has been set. +func (o *User) HasEntities() bool { + if o != nil && o.Entities != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *User) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *User) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *User) GetTypeOk() (*Type, bool) { +func (o *User) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *User) SetType(v Type) { +// SetHref sets field value +func (o *User) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *User) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *User) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *User) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *User) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *User) GetHrefOk() (*string, bool) { +func (o *User) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *User) SetHref(v string) { +// SetId sets field value +func (o *User) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *User) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *User) HasHref() bool { } // GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for UserMetadata will be returned +// If the value is explicit nil, nil is returned func (o *User) GetMetadata() *UserMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *User) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for UserProperties will be returned +// If the value is explicit nil, nil is returned func (o *User) GetProperties() *UserProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *User) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for UsersEntities will be returned -func (o *User) GetEntities() *UsersEntities { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *User) GetType() *Type { if o == nil { return nil } - return o.Entities + return o.Type } -// GetEntitiesOk returns a tuple with the Entities field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *User) GetEntitiesOk() (*UsersEntities, bool) { +func (o *User) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *User) SetEntities(v UsersEntities) { +// SetType sets field value +func (o *User) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *User) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *User) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *User) HasEntities() bool { func (o User) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Entities != nil { + toSerialize["entities"] = o.Entities } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } - if o.Entities != nil { - toSerialize["entities"] = o.Entities + + if o.Type != nil { + toSerialize["type"] = o.Type } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_metadata.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_metadata.go index da90dc00b891..de6738d715fc 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_metadata.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_metadata.go @@ -17,10 +17,10 @@ import ( // UserMetadata struct for UserMetadata type UserMetadata struct { - // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. - Etag *string `json:"etag,omitempty"` // The time the user was created. CreatedDate *IonosTime + // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. + Etag *string `json:"etag,omitempty"` // The time of the last login by the user. LastLogin *IonosTime } @@ -43,83 +43,83 @@ func NewUserMetadataWithDefaults() *UserMetadata { return &this } -// GetEtag returns the Etag field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserMetadata) GetEtag() *string { +// GetCreatedDate returns the CreatedDate field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } - return o.Etag + if o.CreatedDate == nil { + return nil + } + return &o.CreatedDate.Time } -// GetEtagOk returns a tuple with the Etag field value +// GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserMetadata) GetEtagOk() (*string, bool) { +func (o *UserMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.Etag, true + if o.CreatedDate == nil { + return nil, false + } + return &o.CreatedDate.Time, true + } -// SetEtag sets field value -func (o *UserMetadata) SetEtag(v string) { +// SetCreatedDate sets field value +func (o *UserMetadata) SetCreatedDate(v time.Time) { - o.Etag = &v + o.CreatedDate = &IonosTime{v} } -// HasEtag returns a boolean if a field has been set. -func (o *UserMetadata) HasEtag() bool { - if o != nil && o.Etag != nil { +// HasCreatedDate returns a boolean if a field has been set. +func (o *UserMetadata) HasCreatedDate() bool { + if o != nil && o.CreatedDate != nil { return true } return false } -// GetCreatedDate returns the CreatedDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *UserMetadata) GetCreatedDate() *time.Time { +// GetEtag returns the Etag field value +// If the value is explicit nil, nil is returned +func (o *UserMetadata) GetEtag() *string { if o == nil { return nil } - if o.CreatedDate == nil { - return nil - } - return &o.CreatedDate.Time + return o.Etag } -// GetCreatedDateOk returns a tuple with the CreatedDate field value +// GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserMetadata) GetCreatedDateOk() (*time.Time, bool) { +func (o *UserMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } - if o.CreatedDate == nil { - return nil, false - } - return &o.CreatedDate.Time, true - + return o.Etag, true } -// SetCreatedDate sets field value -func (o *UserMetadata) SetCreatedDate(v time.Time) { +// SetEtag sets field value +func (o *UserMetadata) SetEtag(v string) { - o.CreatedDate = &IonosTime{v} + o.Etag = &v } -// HasCreatedDate returns a boolean if a field has been set. -func (o *UserMetadata) HasCreatedDate() bool { - if o != nil && o.CreatedDate != nil { +// HasEtag returns a boolean if a field has been set. +func (o *UserMetadata) HasEtag() bool { + if o != nil && o.Etag != nil { return true } @@ -127,7 +127,7 @@ func (o *UserMetadata) HasCreatedDate() bool { } // GetLastLogin returns the LastLogin field value -// If the value is explicit nil, the zero value for time.Time will be returned +// If the value is explicit nil, nil is returned func (o *UserMetadata) GetLastLogin() *time.Time { if o == nil { return nil @@ -173,15 +173,18 @@ func (o *UserMetadata) HasLastLogin() bool { func (o UserMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Etag != nil { - toSerialize["etag"] = o.Etag - } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } + + if o.Etag != nil { + toSerialize["etag"] = o.Etag + } + if o.LastLogin != nil { toSerialize["lastLogin"] = o.LastLogin } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_post.go index 912dc3391990..cfbe91439f2e 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_post.go @@ -40,7 +40,7 @@ func NewUserPostWithDefaults() *UserPost { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for UserPropertiesPost will be returned +// If the value is explicit nil, nil is returned func (o *UserPost) GetProperties() *UserPropertiesPost { if o == nil { return nil @@ -82,6 +82,7 @@ func (o UserPost) MarshalJSON() ([]byte, error) { if o.Properties != nil { toSerialize["properties"] = o.Properties } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties.go index 6ff0ff0f00ca..7fadd2b431f9 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties.go @@ -16,22 +16,22 @@ import ( // UserProperties struct for UserProperties type UserProperties struct { - // The first name of the user. - Firstname *string `json:"firstname,omitempty"` - // The last name of the user. - Lastname *string `json:"lastname,omitempty"` - // The email address of the user. - Email *string `json:"email,omitempty"` + // Indicates if the user is active. + Active *bool `json:"active,omitempty"` // Indicates if the user has admin rights. Administrator *bool `json:"administrator,omitempty"` + // The email address of the user. + Email *string `json:"email,omitempty"` + // The first name of the user. + Firstname *string `json:"firstname,omitempty"` // Indicates if secure authentication should be forced on the user. ForceSecAuth *bool `json:"forceSecAuth,omitempty"` - // Indicates if secure authentication is active for the user. - SecAuthActive *bool `json:"secAuthActive,omitempty"` + // The last name of the user. + Lastname *string `json:"lastname,omitempty"` // Canonical (S3) ID of the user for a given identity. S3CanonicalUserId *string `json:"s3CanonicalUserId,omitempty"` - // Indicates if the user is active. - Active *bool `json:"active,omitempty"` + // Indicates if secure authentication is active for the user. + SecAuthActive *bool `json:"secAuthActive,omitempty"` } // NewUserProperties instantiates a new UserProperties object @@ -52,76 +52,76 @@ func NewUserPropertiesWithDefaults() *UserProperties { return &this } -// GetFirstname returns the Firstname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserProperties) GetFirstname() *string { +// GetActive returns the Active field value +// If the value is explicit nil, nil is returned +func (o *UserProperties) GetActive() *bool { if o == nil { return nil } - return o.Firstname + return o.Active } -// GetFirstnameOk returns a tuple with the Firstname field value +// GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserProperties) GetFirstnameOk() (*string, bool) { +func (o *UserProperties) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.Firstname, true + return o.Active, true } -// SetFirstname sets field value -func (o *UserProperties) SetFirstname(v string) { +// SetActive sets field value +func (o *UserProperties) SetActive(v bool) { - o.Firstname = &v + o.Active = &v } -// HasFirstname returns a boolean if a field has been set. -func (o *UserProperties) HasFirstname() bool { - if o != nil && o.Firstname != nil { +// HasActive returns a boolean if a field has been set. +func (o *UserProperties) HasActive() bool { + if o != nil && o.Active != nil { return true } return false } -// GetLastname returns the Lastname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserProperties) GetLastname() *string { +// GetAdministrator returns the Administrator field value +// If the value is explicit nil, nil is returned +func (o *UserProperties) GetAdministrator() *bool { if o == nil { return nil } - return o.Lastname + return o.Administrator } -// GetLastnameOk returns a tuple with the Lastname field value +// GetAdministratorOk returns a tuple with the Administrator field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserProperties) GetLastnameOk() (*string, bool) { +func (o *UserProperties) GetAdministratorOk() (*bool, bool) { if o == nil { return nil, false } - return o.Lastname, true + return o.Administrator, true } -// SetLastname sets field value -func (o *UserProperties) SetLastname(v string) { +// SetAdministrator sets field value +func (o *UserProperties) SetAdministrator(v bool) { - o.Lastname = &v + o.Administrator = &v } -// HasLastname returns a boolean if a field has been set. -func (o *UserProperties) HasLastname() bool { - if o != nil && o.Lastname != nil { +// HasAdministrator returns a boolean if a field has been set. +func (o *UserProperties) HasAdministrator() bool { + if o != nil && o.Administrator != nil { return true } @@ -129,7 +129,7 @@ func (o *UserProperties) HasLastname() bool { } // GetEmail returns the Email field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *UserProperties) GetEmail() *string { if o == nil { return nil @@ -166,38 +166,38 @@ func (o *UserProperties) HasEmail() bool { return false } -// GetAdministrator returns the Administrator field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserProperties) GetAdministrator() *bool { +// GetFirstname returns the Firstname field value +// If the value is explicit nil, nil is returned +func (o *UserProperties) GetFirstname() *string { if o == nil { return nil } - return o.Administrator + return o.Firstname } -// GetAdministratorOk returns a tuple with the Administrator field value +// GetFirstnameOk returns a tuple with the Firstname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserProperties) GetAdministratorOk() (*bool, bool) { +func (o *UserProperties) GetFirstnameOk() (*string, bool) { if o == nil { return nil, false } - return o.Administrator, true + return o.Firstname, true } -// SetAdministrator sets field value -func (o *UserProperties) SetAdministrator(v bool) { +// SetFirstname sets field value +func (o *UserProperties) SetFirstname(v string) { - o.Administrator = &v + o.Firstname = &v } -// HasAdministrator returns a boolean if a field has been set. -func (o *UserProperties) HasAdministrator() bool { - if o != nil && o.Administrator != nil { +// HasFirstname returns a boolean if a field has been set. +func (o *UserProperties) HasFirstname() bool { + if o != nil && o.Firstname != nil { return true } @@ -205,7 +205,7 @@ func (o *UserProperties) HasAdministrator() bool { } // GetForceSecAuth returns the ForceSecAuth field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *UserProperties) GetForceSecAuth() *bool { if o == nil { return nil @@ -242,38 +242,38 @@ func (o *UserProperties) HasForceSecAuth() bool { return false } -// GetSecAuthActive returns the SecAuthActive field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserProperties) GetSecAuthActive() *bool { +// GetLastname returns the Lastname field value +// If the value is explicit nil, nil is returned +func (o *UserProperties) GetLastname() *string { if o == nil { return nil } - return o.SecAuthActive + return o.Lastname } -// GetSecAuthActiveOk returns a tuple with the SecAuthActive field value +// GetLastnameOk returns a tuple with the Lastname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserProperties) GetSecAuthActiveOk() (*bool, bool) { +func (o *UserProperties) GetLastnameOk() (*string, bool) { if o == nil { return nil, false } - return o.SecAuthActive, true + return o.Lastname, true } -// SetSecAuthActive sets field value -func (o *UserProperties) SetSecAuthActive(v bool) { +// SetLastname sets field value +func (o *UserProperties) SetLastname(v string) { - o.SecAuthActive = &v + o.Lastname = &v } -// HasSecAuthActive returns a boolean if a field has been set. -func (o *UserProperties) HasSecAuthActive() bool { - if o != nil && o.SecAuthActive != nil { +// HasLastname returns a boolean if a field has been set. +func (o *UserProperties) HasLastname() bool { + if o != nil && o.Lastname != nil { return true } @@ -281,7 +281,7 @@ func (o *UserProperties) HasSecAuthActive() bool { } // GetS3CanonicalUserId returns the S3CanonicalUserId field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *UserProperties) GetS3CanonicalUserId() *string { if o == nil { return nil @@ -318,38 +318,38 @@ func (o *UserProperties) HasS3CanonicalUserId() bool { return false } -// GetActive returns the Active field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserProperties) GetActive() *bool { +// GetSecAuthActive returns the SecAuthActive field value +// If the value is explicit nil, nil is returned +func (o *UserProperties) GetSecAuthActive() *bool { if o == nil { return nil } - return o.Active + return o.SecAuthActive } -// GetActiveOk returns a tuple with the Active field value +// GetSecAuthActiveOk returns a tuple with the SecAuthActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserProperties) GetActiveOk() (*bool, bool) { +func (o *UserProperties) GetSecAuthActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.Active, true + return o.SecAuthActive, true } -// SetActive sets field value -func (o *UserProperties) SetActive(v bool) { +// SetSecAuthActive sets field value +func (o *UserProperties) SetSecAuthActive(v bool) { - o.Active = &v + o.SecAuthActive = &v } -// HasActive returns a boolean if a field has been set. -func (o *UserProperties) HasActive() bool { - if o != nil && o.Active != nil { +// HasSecAuthActive returns a boolean if a field has been set. +func (o *UserProperties) HasSecAuthActive() bool { + if o != nil && o.SecAuthActive != nil { return true } @@ -358,30 +358,38 @@ func (o *UserProperties) HasActive() bool { func (o UserProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Firstname != nil { - toSerialize["firstname"] = o.Firstname + if o.Active != nil { + toSerialize["active"] = o.Active } - if o.Lastname != nil { - toSerialize["lastname"] = o.Lastname + + if o.Administrator != nil { + toSerialize["administrator"] = o.Administrator } + if o.Email != nil { toSerialize["email"] = o.Email } - if o.Administrator != nil { - toSerialize["administrator"] = o.Administrator + + if o.Firstname != nil { + toSerialize["firstname"] = o.Firstname } + if o.ForceSecAuth != nil { toSerialize["forceSecAuth"] = o.ForceSecAuth } - if o.SecAuthActive != nil { - toSerialize["secAuthActive"] = o.SecAuthActive + + if o.Lastname != nil { + toSerialize["lastname"] = o.Lastname } + if o.S3CanonicalUserId != nil { toSerialize["s3CanonicalUserId"] = o.S3CanonicalUserId } - if o.Active != nil { - toSerialize["active"] = o.Active + + if o.SecAuthActive != nil { + toSerialize["secAuthActive"] = o.SecAuthActive } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_post.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_post.go index 463eb6dc3a36..fb4e9026f5b2 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_post.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_post.go @@ -16,22 +16,22 @@ import ( // UserPropertiesPost struct for UserPropertiesPost type UserPropertiesPost struct { - // The first name of the user. - Firstname *string `json:"firstname,omitempty"` - // The last name of the user. - Lastname *string `json:"lastname,omitempty"` - // The email address of the user. - Email *string `json:"email,omitempty"` + // Indicates if the user is active. + Active *bool `json:"active,omitempty"` // Indicates if the user has admin rights. Administrator *bool `json:"administrator,omitempty"` + // The email address of the user. + Email *string `json:"email,omitempty"` + // The first name of the user. + Firstname *string `json:"firstname,omitempty"` // Indicates if secure authentication should be forced on the user. ForceSecAuth *bool `json:"forceSecAuth,omitempty"` - // Indicates if secure authentication is active for the user. - SecAuthActive *bool `json:"secAuthActive,omitempty"` + // The last name of the user. + Lastname *string `json:"lastname,omitempty"` // User password. Password *string `json:"password,omitempty"` - // Indicates if the user is active. - Active *bool `json:"active,omitempty"` + // Indicates if secure authentication is active for the user. + SecAuthActive *bool `json:"secAuthActive,omitempty"` } // NewUserPropertiesPost instantiates a new UserPropertiesPost object @@ -52,76 +52,76 @@ func NewUserPropertiesPostWithDefaults() *UserPropertiesPost { return &this } -// GetFirstname returns the Firstname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserPropertiesPost) GetFirstname() *string { +// GetActive returns the Active field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPost) GetActive() *bool { if o == nil { return nil } - return o.Firstname + return o.Active } -// GetFirstnameOk returns a tuple with the Firstname field value +// GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPost) GetFirstnameOk() (*string, bool) { +func (o *UserPropertiesPost) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.Firstname, true + return o.Active, true } -// SetFirstname sets field value -func (o *UserPropertiesPost) SetFirstname(v string) { +// SetActive sets field value +func (o *UserPropertiesPost) SetActive(v bool) { - o.Firstname = &v + o.Active = &v } -// HasFirstname returns a boolean if a field has been set. -func (o *UserPropertiesPost) HasFirstname() bool { - if o != nil && o.Firstname != nil { +// HasActive returns a boolean if a field has been set. +func (o *UserPropertiesPost) HasActive() bool { + if o != nil && o.Active != nil { return true } return false } -// GetLastname returns the Lastname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserPropertiesPost) GetLastname() *string { +// GetAdministrator returns the Administrator field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPost) GetAdministrator() *bool { if o == nil { return nil } - return o.Lastname + return o.Administrator } -// GetLastnameOk returns a tuple with the Lastname field value +// GetAdministratorOk returns a tuple with the Administrator field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPost) GetLastnameOk() (*string, bool) { +func (o *UserPropertiesPost) GetAdministratorOk() (*bool, bool) { if o == nil { return nil, false } - return o.Lastname, true + return o.Administrator, true } -// SetLastname sets field value -func (o *UserPropertiesPost) SetLastname(v string) { +// SetAdministrator sets field value +func (o *UserPropertiesPost) SetAdministrator(v bool) { - o.Lastname = &v + o.Administrator = &v } -// HasLastname returns a boolean if a field has been set. -func (o *UserPropertiesPost) HasLastname() bool { - if o != nil && o.Lastname != nil { +// HasAdministrator returns a boolean if a field has been set. +func (o *UserPropertiesPost) HasAdministrator() bool { + if o != nil && o.Administrator != nil { return true } @@ -129,7 +129,7 @@ func (o *UserPropertiesPost) HasLastname() bool { } // GetEmail returns the Email field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetEmail() *string { if o == nil { return nil @@ -166,38 +166,38 @@ func (o *UserPropertiesPost) HasEmail() bool { return false } -// GetAdministrator returns the Administrator field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPost) GetAdministrator() *bool { +// GetFirstname returns the Firstname field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPost) GetFirstname() *string { if o == nil { return nil } - return o.Administrator + return o.Firstname } -// GetAdministratorOk returns a tuple with the Administrator field value +// GetFirstnameOk returns a tuple with the Firstname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPost) GetAdministratorOk() (*bool, bool) { +func (o *UserPropertiesPost) GetFirstnameOk() (*string, bool) { if o == nil { return nil, false } - return o.Administrator, true + return o.Firstname, true } -// SetAdministrator sets field value -func (o *UserPropertiesPost) SetAdministrator(v bool) { +// SetFirstname sets field value +func (o *UserPropertiesPost) SetFirstname(v string) { - o.Administrator = &v + o.Firstname = &v } -// HasAdministrator returns a boolean if a field has been set. -func (o *UserPropertiesPost) HasAdministrator() bool { - if o != nil && o.Administrator != nil { +// HasFirstname returns a boolean if a field has been set. +func (o *UserPropertiesPost) HasFirstname() bool { + if o != nil && o.Firstname != nil { return true } @@ -205,7 +205,7 @@ func (o *UserPropertiesPost) HasAdministrator() bool { } // GetForceSecAuth returns the ForceSecAuth field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetForceSecAuth() *bool { if o == nil { return nil @@ -242,38 +242,38 @@ func (o *UserPropertiesPost) HasForceSecAuth() bool { return false } -// GetSecAuthActive returns the SecAuthActive field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPost) GetSecAuthActive() *bool { +// GetLastname returns the Lastname field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPost) GetLastname() *string { if o == nil { return nil } - return o.SecAuthActive + return o.Lastname } -// GetSecAuthActiveOk returns a tuple with the SecAuthActive field value +// GetLastnameOk returns a tuple with the Lastname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPost) GetSecAuthActiveOk() (*bool, bool) { +func (o *UserPropertiesPost) GetLastnameOk() (*string, bool) { if o == nil { return nil, false } - return o.SecAuthActive, true + return o.Lastname, true } -// SetSecAuthActive sets field value -func (o *UserPropertiesPost) SetSecAuthActive(v bool) { +// SetLastname sets field value +func (o *UserPropertiesPost) SetLastname(v string) { - o.SecAuthActive = &v + o.Lastname = &v } -// HasSecAuthActive returns a boolean if a field has been set. -func (o *UserPropertiesPost) HasSecAuthActive() bool { - if o != nil && o.SecAuthActive != nil { +// HasLastname returns a boolean if a field has been set. +func (o *UserPropertiesPost) HasLastname() bool { + if o != nil && o.Lastname != nil { return true } @@ -281,7 +281,7 @@ func (o *UserPropertiesPost) HasSecAuthActive() bool { } // GetPassword returns the Password field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetPassword() *string { if o == nil { return nil @@ -318,38 +318,38 @@ func (o *UserPropertiesPost) HasPassword() bool { return false } -// GetActive returns the Active field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPost) GetActive() *bool { +// GetSecAuthActive returns the SecAuthActive field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPost) GetSecAuthActive() *bool { if o == nil { return nil } - return o.Active + return o.SecAuthActive } -// GetActiveOk returns a tuple with the Active field value +// GetSecAuthActiveOk returns a tuple with the SecAuthActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPost) GetActiveOk() (*bool, bool) { +func (o *UserPropertiesPost) GetSecAuthActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.Active, true + return o.SecAuthActive, true } -// SetActive sets field value -func (o *UserPropertiesPost) SetActive(v bool) { +// SetSecAuthActive sets field value +func (o *UserPropertiesPost) SetSecAuthActive(v bool) { - o.Active = &v + o.SecAuthActive = &v } -// HasActive returns a boolean if a field has been set. -func (o *UserPropertiesPost) HasActive() bool { - if o != nil && o.Active != nil { +// HasSecAuthActive returns a boolean if a field has been set. +func (o *UserPropertiesPost) HasSecAuthActive() bool { + if o != nil && o.SecAuthActive != nil { return true } @@ -358,30 +358,38 @@ func (o *UserPropertiesPost) HasActive() bool { func (o UserPropertiesPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Firstname != nil { - toSerialize["firstname"] = o.Firstname + if o.Active != nil { + toSerialize["active"] = o.Active } - if o.Lastname != nil { - toSerialize["lastname"] = o.Lastname + + if o.Administrator != nil { + toSerialize["administrator"] = o.Administrator } + if o.Email != nil { toSerialize["email"] = o.Email } - if o.Administrator != nil { - toSerialize["administrator"] = o.Administrator + + if o.Firstname != nil { + toSerialize["firstname"] = o.Firstname } + if o.ForceSecAuth != nil { toSerialize["forceSecAuth"] = o.ForceSecAuth } - if o.SecAuthActive != nil { - toSerialize["secAuthActive"] = o.SecAuthActive + + if o.Lastname != nil { + toSerialize["lastname"] = o.Lastname } + if o.Password != nil { toSerialize["password"] = o.Password } - if o.Active != nil { - toSerialize["active"] = o.Active + + if o.SecAuthActive != nil { + toSerialize["secAuthActive"] = o.SecAuthActive } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_put.go index 778c3b0cfc54..d0ad92946ec7 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_properties_put.go @@ -16,22 +16,22 @@ import ( // UserPropertiesPut struct for UserPropertiesPut type UserPropertiesPut struct { + // Indicates if the user is active. + Active *bool `json:"active,omitempty"` + // Indicates if the user has admin rights. + Administrator *bool `json:"administrator,omitempty"` + // The email address of the user. + Email *string `json:"email,omitempty"` // The first name of the user. Firstname *string `json:"firstname,omitempty"` + // Indicates if secure authentication should be forced on the user. + ForceSecAuth *bool `json:"forceSecAuth,omitempty"` // The last name of the user. Lastname *string `json:"lastname,omitempty"` - // The email address of the user. - Email *string `json:"email,omitempty"` // password of the user Password *string `json:"password,omitempty"` - // Indicates if the user has admin rights. - Administrator *bool `json:"administrator,omitempty"` - // Indicates if secure authentication should be forced on the user. - ForceSecAuth *bool `json:"forceSecAuth,omitempty"` // Indicates if secure authentication is active for the user. SecAuthActive *bool `json:"secAuthActive,omitempty"` - // Indicates if the user is active. - Active *bool `json:"active,omitempty"` } // NewUserPropertiesPut instantiates a new UserPropertiesPut object @@ -52,76 +52,76 @@ func NewUserPropertiesPutWithDefaults() *UserPropertiesPut { return &this } -// GetFirstname returns the Firstname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserPropertiesPut) GetFirstname() *string { +// GetActive returns the Active field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetActive() *bool { if o == nil { return nil } - return o.Firstname + return o.Active } -// GetFirstnameOk returns a tuple with the Firstname field value +// GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetFirstnameOk() (*string, bool) { +func (o *UserPropertiesPut) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.Firstname, true + return o.Active, true } -// SetFirstname sets field value -func (o *UserPropertiesPut) SetFirstname(v string) { +// SetActive sets field value +func (o *UserPropertiesPut) SetActive(v bool) { - o.Firstname = &v + o.Active = &v } -// HasFirstname returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasFirstname() bool { - if o != nil && o.Firstname != nil { +// HasActive returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasActive() bool { + if o != nil && o.Active != nil { return true } return false } -// GetLastname returns the Lastname field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserPropertiesPut) GetLastname() *string { +// GetAdministrator returns the Administrator field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetAdministrator() *bool { if o == nil { return nil } - return o.Lastname + return o.Administrator } -// GetLastnameOk returns a tuple with the Lastname field value +// GetAdministratorOk returns a tuple with the Administrator field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetLastnameOk() (*string, bool) { +func (o *UserPropertiesPut) GetAdministratorOk() (*bool, bool) { if o == nil { return nil, false } - return o.Lastname, true + return o.Administrator, true } -// SetLastname sets field value -func (o *UserPropertiesPut) SetLastname(v string) { +// SetAdministrator sets field value +func (o *UserPropertiesPut) SetAdministrator(v bool) { - o.Lastname = &v + o.Administrator = &v } -// HasLastname returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasLastname() bool { - if o != nil && o.Lastname != nil { +// HasAdministrator returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasAdministrator() bool { + if o != nil && o.Administrator != nil { return true } @@ -129,7 +129,7 @@ func (o *UserPropertiesPut) HasLastname() bool { } // GetEmail returns the Email field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetEmail() *string { if o == nil { return nil @@ -166,190 +166,190 @@ func (o *UserPropertiesPut) HasEmail() bool { return false } -// GetPassword returns the Password field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserPropertiesPut) GetPassword() *string { +// GetFirstname returns the Firstname field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetFirstname() *string { if o == nil { return nil } - return o.Password + return o.Firstname } -// GetPasswordOk returns a tuple with the Password field value +// GetFirstnameOk returns a tuple with the Firstname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetPasswordOk() (*string, bool) { +func (o *UserPropertiesPut) GetFirstnameOk() (*string, bool) { if o == nil { return nil, false } - return o.Password, true + return o.Firstname, true } -// SetPassword sets field value -func (o *UserPropertiesPut) SetPassword(v string) { +// SetFirstname sets field value +func (o *UserPropertiesPut) SetFirstname(v string) { - o.Password = &v + o.Firstname = &v } -// HasPassword returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasPassword() bool { - if o != nil && o.Password != nil { +// HasFirstname returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasFirstname() bool { + if o != nil && o.Firstname != nil { return true } return false } -// GetAdministrator returns the Administrator field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPut) GetAdministrator() *bool { +// GetForceSecAuth returns the ForceSecAuth field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetForceSecAuth() *bool { if o == nil { return nil } - return o.Administrator + return o.ForceSecAuth } -// GetAdministratorOk returns a tuple with the Administrator field value +// GetForceSecAuthOk returns a tuple with the ForceSecAuth field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetAdministratorOk() (*bool, bool) { +func (o *UserPropertiesPut) GetForceSecAuthOk() (*bool, bool) { if o == nil { return nil, false } - return o.Administrator, true + return o.ForceSecAuth, true } -// SetAdministrator sets field value -func (o *UserPropertiesPut) SetAdministrator(v bool) { +// SetForceSecAuth sets field value +func (o *UserPropertiesPut) SetForceSecAuth(v bool) { - o.Administrator = &v + o.ForceSecAuth = &v } -// HasAdministrator returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasAdministrator() bool { - if o != nil && o.Administrator != nil { +// HasForceSecAuth returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasForceSecAuth() bool { + if o != nil && o.ForceSecAuth != nil { return true } return false } -// GetForceSecAuth returns the ForceSecAuth field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPut) GetForceSecAuth() *bool { +// GetLastname returns the Lastname field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetLastname() *string { if o == nil { return nil } - return o.ForceSecAuth + return o.Lastname } -// GetForceSecAuthOk returns a tuple with the ForceSecAuth field value +// GetLastnameOk returns a tuple with the Lastname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetForceSecAuthOk() (*bool, bool) { +func (o *UserPropertiesPut) GetLastnameOk() (*string, bool) { if o == nil { return nil, false } - return o.ForceSecAuth, true + return o.Lastname, true } -// SetForceSecAuth sets field value -func (o *UserPropertiesPut) SetForceSecAuth(v bool) { +// SetLastname sets field value +func (o *UserPropertiesPut) SetLastname(v string) { - o.ForceSecAuth = &v + o.Lastname = &v } -// HasForceSecAuth returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasForceSecAuth() bool { - if o != nil && o.ForceSecAuth != nil { +// HasLastname returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasLastname() bool { + if o != nil && o.Lastname != nil { return true } return false } -// GetSecAuthActive returns the SecAuthActive field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPut) GetSecAuthActive() *bool { +// GetPassword returns the Password field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetPassword() *string { if o == nil { return nil } - return o.SecAuthActive + return o.Password } -// GetSecAuthActiveOk returns a tuple with the SecAuthActive field value +// GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetSecAuthActiveOk() (*bool, bool) { +func (o *UserPropertiesPut) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } - return o.SecAuthActive, true + return o.Password, true } -// SetSecAuthActive sets field value -func (o *UserPropertiesPut) SetSecAuthActive(v bool) { +// SetPassword sets field value +func (o *UserPropertiesPut) SetPassword(v string) { - o.SecAuthActive = &v + o.Password = &v } -// HasSecAuthActive returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasSecAuthActive() bool { - if o != nil && o.SecAuthActive != nil { +// HasPassword returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasPassword() bool { + if o != nil && o.Password != nil { return true } return false } -// GetActive returns the Active field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *UserPropertiesPut) GetActive() *bool { +// GetSecAuthActive returns the SecAuthActive field value +// If the value is explicit nil, nil is returned +func (o *UserPropertiesPut) GetSecAuthActive() *bool { if o == nil { return nil } - return o.Active + return o.SecAuthActive } -// GetActiveOk returns a tuple with the Active field value +// GetSecAuthActiveOk returns a tuple with the SecAuthActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserPropertiesPut) GetActiveOk() (*bool, bool) { +func (o *UserPropertiesPut) GetSecAuthActiveOk() (*bool, bool) { if o == nil { return nil, false } - return o.Active, true + return o.SecAuthActive, true } -// SetActive sets field value -func (o *UserPropertiesPut) SetActive(v bool) { +// SetSecAuthActive sets field value +func (o *UserPropertiesPut) SetSecAuthActive(v bool) { - o.Active = &v + o.SecAuthActive = &v } -// HasActive returns a boolean if a field has been set. -func (o *UserPropertiesPut) HasActive() bool { - if o != nil && o.Active != nil { +// HasSecAuthActive returns a boolean if a field has been set. +func (o *UserPropertiesPut) HasSecAuthActive() bool { + if o != nil && o.SecAuthActive != nil { return true } @@ -358,30 +358,38 @@ func (o *UserPropertiesPut) HasActive() bool { func (o UserPropertiesPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Firstname != nil { - toSerialize["firstname"] = o.Firstname + if o.Active != nil { + toSerialize["active"] = o.Active } - if o.Lastname != nil { - toSerialize["lastname"] = o.Lastname + + if o.Administrator != nil { + toSerialize["administrator"] = o.Administrator } + if o.Email != nil { toSerialize["email"] = o.Email } - if o.Password != nil { - toSerialize["password"] = o.Password - } - if o.Administrator != nil { - toSerialize["administrator"] = o.Administrator + + if o.Firstname != nil { + toSerialize["firstname"] = o.Firstname } + if o.ForceSecAuth != nil { toSerialize["forceSecAuth"] = o.ForceSecAuth } + + if o.Lastname != nil { + toSerialize["lastname"] = o.Lastname + } + + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.SecAuthActive != nil { toSerialize["secAuthActive"] = o.SecAuthActive } - if o.Active != nil { - toSerialize["active"] = o.Active - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_put.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_put.go index b45261f2f442..9e0c992c9908 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_put.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_user_put.go @@ -42,7 +42,7 @@ func NewUserPutWithDefaults() *UserPut { } // GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *UserPut) GetId() *string { if o == nil { return nil @@ -80,7 +80,7 @@ func (o *UserPut) HasId() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for UserPropertiesPut will be returned +// If the value is explicit nil, nil is returned func (o *UserPut) GetProperties() *UserPropertiesPut { if o == nil { return nil @@ -122,9 +122,11 @@ func (o UserPut) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users.go index 0107d029b325..e67610e195ff 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users.go @@ -16,19 +16,19 @@ import ( // Users struct for Users type Users struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]User `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewUsers instantiates a new Users object @@ -49,114 +49,114 @@ func NewUsersWithDefaults() *Users { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Users) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Users) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Users) GetIdOk() (*string, bool) { +func (o *Users) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Users) SetId(v string) { +// SetLinks sets field value +func (o *Users) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Users) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Users) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Users) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Users) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Users) GetTypeOk() (*Type, bool) { +func (o *Users) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Users) SetType(v Type) { +// SetHref sets field value +func (o *Users) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Users) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Users) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Users) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Users) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Users) GetHrefOk() (*string, bool) { +func (o *Users) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Users) SetHref(v string) { +// SetId sets field value +func (o *Users) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Users) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Users) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Users) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []User will be returned +// If the value is explicit nil, nil is returned func (o *Users) GetItems() *[]User { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Users) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Users) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Users) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Users) GetOffsetOk() (*float32, bool) { +func (o *Users) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Users) SetOffset(v float32) { +// SetLimit sets field value +func (o *Users) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Users) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Users) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Users) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Users) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Users) GetLimitOk() (*float32, bool) { +func (o *Users) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Users) SetLimit(v float32) { +// SetOffset sets field value +func (o *Users) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Users) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Users) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Users) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Users) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Users) GetLinksOk() (*PaginationLinks, bool) { +func (o *Users) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Users) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Users) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Users) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Users) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Users) HasLinks() bool { func (o Users) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users_entities.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users_entities.go index 6c10d5a04b1d..7619f6611922 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users_entities.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_users_entities.go @@ -16,8 +16,8 @@ import ( // UsersEntities struct for UsersEntities type UsersEntities struct { - Owns *ResourcesUsers `json:"owns,omitempty"` Groups *GroupUsers `json:"groups,omitempty"` + Owns *ResourcesUsers `json:"owns,omitempty"` } // NewUsersEntities instantiates a new UsersEntities object @@ -38,76 +38,76 @@ func NewUsersEntitiesWithDefaults() *UsersEntities { return &this } -// GetOwns returns the Owns field value -// If the value is explicit nil, the zero value for ResourcesUsers will be returned -func (o *UsersEntities) GetOwns() *ResourcesUsers { +// GetGroups returns the Groups field value +// If the value is explicit nil, nil is returned +func (o *UsersEntities) GetGroups() *GroupUsers { if o == nil { return nil } - return o.Owns + return o.Groups } -// GetOwnsOk returns a tuple with the Owns field value +// GetGroupsOk returns a tuple with the Groups field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UsersEntities) GetOwnsOk() (*ResourcesUsers, bool) { +func (o *UsersEntities) GetGroupsOk() (*GroupUsers, bool) { if o == nil { return nil, false } - return o.Owns, true + return o.Groups, true } -// SetOwns sets field value -func (o *UsersEntities) SetOwns(v ResourcesUsers) { +// SetGroups sets field value +func (o *UsersEntities) SetGroups(v GroupUsers) { - o.Owns = &v + o.Groups = &v } -// HasOwns returns a boolean if a field has been set. -func (o *UsersEntities) HasOwns() bool { - if o != nil && o.Owns != nil { +// HasGroups returns a boolean if a field has been set. +func (o *UsersEntities) HasGroups() bool { + if o != nil && o.Groups != nil { return true } return false } -// GetGroups returns the Groups field value -// If the value is explicit nil, the zero value for GroupUsers will be returned -func (o *UsersEntities) GetGroups() *GroupUsers { +// GetOwns returns the Owns field value +// If the value is explicit nil, nil is returned +func (o *UsersEntities) GetOwns() *ResourcesUsers { if o == nil { return nil } - return o.Groups + return o.Owns } -// GetGroupsOk returns a tuple with the Groups field value +// GetOwnsOk returns a tuple with the Owns field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UsersEntities) GetGroupsOk() (*GroupUsers, bool) { +func (o *UsersEntities) GetOwnsOk() (*ResourcesUsers, bool) { if o == nil { return nil, false } - return o.Groups, true + return o.Owns, true } -// SetGroups sets field value -func (o *UsersEntities) SetGroups(v GroupUsers) { +// SetOwns sets field value +func (o *UsersEntities) SetOwns(v ResourcesUsers) { - o.Groups = &v + o.Owns = &v } -// HasGroups returns a boolean if a field has been set. -func (o *UsersEntities) HasGroups() bool { - if o != nil && o.Groups != nil { +// HasOwns returns a boolean if a field has been set. +func (o *UsersEntities) HasOwns() bool { + if o != nil && o.Owns != nil { return true } @@ -116,12 +116,14 @@ func (o *UsersEntities) HasGroups() bool { func (o UsersEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Owns != nil { - toSerialize["owns"] = o.Owns - } if o.Groups != nil { toSerialize["groups"] = o.Groups } + + if o.Owns != nil { + toSerialize["owns"] = o.Owns + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume.go index 52f4eca7a8d0..59bf03f024de 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume.go @@ -16,14 +16,14 @@ import ( // Volume struct for Volume type Volume struct { + // The URL to the object representation (absolute path). + Href *string `json:"href,omitempty"` // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` - // URL to the object representation (absolute path). - Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *VolumeProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewVolume instantiates a new Volume object @@ -46,190 +46,190 @@ func NewVolumeWithDefaults() *Volume { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Volume) GetId() *string { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Volume) GetHref() *string { if o == nil { return nil } - return o.Id + return o.Href } -// GetIdOk returns a tuple with the Id field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volume) GetIdOk() (*string, bool) { +func (o *Volume) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *Volume) SetId(v string) { +// SetHref sets field value +func (o *Volume) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *Volume) HasId() bool { - if o != nil && o.Id != nil { +// HasHref returns a boolean if a field has been set. +func (o *Volume) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Volume) GetType() *Type { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Volume) GetId() *string { if o == nil { return nil } - return o.Type + return o.Id } -// GetTypeOk returns a tuple with the Type field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volume) GetTypeOk() (*Type, bool) { +func (o *Volume) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *Volume) SetType(v Type) { +// SetId sets field value +func (o *Volume) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *Volume) HasType() bool { - if o != nil && o.Type != nil { +// HasId returns a boolean if a field has been set. +func (o *Volume) HasId() bool { + if o != nil && o.Id != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Volume) GetHref() *string { +// GetMetadata returns the Metadata field value +// If the value is explicit nil, nil is returned +func (o *Volume) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } - return o.Href + return o.Metadata } -// GetHrefOk returns a tuple with the Href field value +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volume) GetHrefOk() (*string, bool) { +func (o *Volume) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *Volume) SetHref(v string) { +// SetMetadata sets field value +func (o *Volume) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *Volume) HasHref() bool { - if o != nil && o.Href != nil { +// HasMetadata returns a boolean if a field has been set. +func (o *Volume) HasMetadata() bool { + if o != nil && o.Metadata != nil { return true } return false } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *Volume) GetMetadata() *DatacenterElementMetadata { +// GetProperties returns the Properties field value +// If the value is explicit nil, nil is returned +func (o *Volume) GetProperties() *VolumeProperties { if o == nil { return nil } - return o.Metadata + return o.Properties } -// GetMetadataOk returns a tuple with the Metadata field value +// GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volume) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *Volume) GetPropertiesOk() (*VolumeProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *Volume) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *Volume) SetProperties(v VolumeProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *Volume) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// HasProperties returns a boolean if a field has been set. +func (o *Volume) HasProperties() bool { + if o != nil && o.Properties != nil { return true } return false } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for VolumeProperties will be returned -func (o *Volume) GetProperties() *VolumeProperties { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Volume) GetType() *Type { if o == nil { return nil } - return o.Properties + return o.Type } -// GetPropertiesOk returns a tuple with the Properties field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volume) GetPropertiesOk() (*VolumeProperties, bool) { +func (o *Volume) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *Volume) SetProperties(v VolumeProperties) { +// SetType sets field value +func (o *Volume) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *Volume) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *Volume) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *Volume) HasProperties() bool { func (o Volume) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type - } if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } + if o.Properties != nil { toSerialize["properties"] = o.Properties } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume_properties.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume_properties.go index d01fedc835df..6f6bc6b963ed 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume_properties.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volume_properties.go @@ -16,47 +16,50 @@ import ( // VolumeProperties struct for VolumeProperties type VolumeProperties struct { - // The name of the resource. - Name *string `json:"name,omitempty"` - // Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. - Type *string `json:"type,omitempty"` - // The size of the volume in GB. - Size *float32 `json:"size"` // The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD. AvailabilityZone *string `json:"availabilityZone,omitempty"` + // The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property. + BackupunitId *string `json:"backupunitId,omitempty"` + // Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. + // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetBootOrderNil` + BootOrder *string `json:"bootOrder,omitempty"` + // The UUID of the attached server. + BootServer *string `json:"bootServer,omitempty"` + // The bus type for this volume; default is VIRTIO. + Bus *string `json:"bus,omitempty"` + // Hot-plug capable CPU (no reboot required). + CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` + // The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. + DeviceNumber *int64 `json:"deviceNumber,omitempty"` + // Hot-plug capable Virt-IO drive (no reboot required). + DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` + // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. + DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` // Image or snapshot ID to be used as template for this volume. - Image *string `json:"image,omitempty"` + Image *string `json:"image,omitempty"` + ImageAlias *string `json:"imageAlias,omitempty"` // Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9. ImagePassword *string `json:"imagePassword,omitempty"` - ImageAlias *string `json:"imageAlias,omitempty"` - // Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation. - SshKeys *[]string `json:"sshKeys,omitempty"` - // The bus type for this volume; default is VIRTIO. - Bus *string `json:"bus,omitempty"` // OS type for this volume. LicenceType *string `json:"licenceType,omitempty"` - // Hot-plug capable CPU (no reboot required). - CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` - // Hot-plug capable RAM (no reboot required). - RamHotPlug *bool `json:"ramHotPlug,omitempty"` + // The name of the resource. + Name *string `json:"name,omitempty"` // Hot-plug capable NIC (no reboot required). NicHotPlug *bool `json:"nicHotPlug,omitempty"` // Hot-unplug capable NIC (no reboot required). NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` - // Hot-plug capable Virt-IO drive (no reboot required). - DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` - // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. - DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` - // The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. - DeviceNumber *int64 `json:"deviceNumber,omitempty"` // The PCI slot number of the storage volume. Null for volumes, not mounted to a VM. PciSlot *int32 `json:"pciSlot,omitempty"` - // The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property. - BackupunitId *string `json:"backupunitId,omitempty"` + // Hot-plug capable RAM (no reboot required). + RamHotPlug *bool `json:"ramHotPlug,omitempty"` + // The size of the volume in GB. + Size *float32 `json:"size"` + // Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation. + SshKeys *[]string `json:"sshKeys,omitempty"` + // Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. + Type *string `json:"type,omitempty"` // The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property. UserData *string `json:"userData,omitempty"` - // The UUID of the attached server. - BootServer *string `json:"bootServer,omitempty"` } // NewVolumeProperties instantiates a new VolumeProperties object @@ -66,6 +69,8 @@ type VolumeProperties struct { func NewVolumeProperties(size float32) *VolumeProperties { this := VolumeProperties{} + var bootOrder = "AUTO" + this.BootOrder = &bootOrder this.Size = &size return &this @@ -76,459 +81,542 @@ func NewVolumeProperties(size float32) *VolumeProperties { // but it doesn't guarantee that properties required by API are set func NewVolumePropertiesWithDefaults() *VolumeProperties { this := VolumeProperties{} + var bootOrder = "AUTO" + this.BootOrder = &bootOrder return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetName() *string { +// GetAvailabilityZone returns the AvailabilityZone field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetAvailabilityZone() *string { if o == nil { return nil } - return o.Name + return o.AvailabilityZone } -// GetNameOk returns a tuple with the Name field value +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetNameOk() (*string, bool) { +func (o *VolumeProperties) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.AvailabilityZone, true } -// SetName sets field value -func (o *VolumeProperties) SetName(v string) { +// SetAvailabilityZone sets field value +func (o *VolumeProperties) SetAvailabilityZone(v string) { - o.Name = &v + o.AvailabilityZone = &v } -// HasName returns a boolean if a field has been set. -func (o *VolumeProperties) HasName() bool { - if o != nil && o.Name != nil { +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *VolumeProperties) HasAvailabilityZone() bool { + if o != nil && o.AvailabilityZone != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetType() *string { +// GetBackupunitId returns the BackupunitId field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetBackupunitId() *string { if o == nil { return nil } - return o.Type + return o.BackupunitId } -// GetTypeOk returns a tuple with the Type field value +// GetBackupunitIdOk returns a tuple with the BackupunitId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetTypeOk() (*string, bool) { +func (o *VolumeProperties) GetBackupunitIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.BackupunitId, true } -// SetType sets field value -func (o *VolumeProperties) SetType(v string) { +// SetBackupunitId sets field value +func (o *VolumeProperties) SetBackupunitId(v string) { - o.Type = &v + o.BackupunitId = &v } -// HasType returns a boolean if a field has been set. -func (o *VolumeProperties) HasType() bool { - if o != nil && o.Type != nil { +// HasBackupunitId returns a boolean if a field has been set. +func (o *VolumeProperties) HasBackupunitId() bool { + if o != nil && o.BackupunitId != nil { return true } return false } -// GetSize returns the Size field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *VolumeProperties) GetSize() *float32 { +// GetBootOrder returns the BootOrder field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetBootOrder() *string { if o == nil { return nil } - return o.Size + return o.BootOrder } -// GetSizeOk returns a tuple with the Size field value +// GetBootOrderOk returns a tuple with the BootOrder field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetSizeOk() (*float32, bool) { +func (o *VolumeProperties) GetBootOrderOk() (*string, bool) { if o == nil { return nil, false } - return o.Size, true + return o.BootOrder, true } -// SetSize sets field value -func (o *VolumeProperties) SetSize(v float32) { +// SetBootOrder sets field value +func (o *VolumeProperties) SetBootOrder(v string) { - o.Size = &v + o.BootOrder = &v } -// HasSize returns a boolean if a field has been set. -func (o *VolumeProperties) HasSize() bool { - if o != nil && o.Size != nil { +// sets BootOrder to the explicit address that will be encoded as nil when marshaled +func (o *VolumeProperties) SetBootOrderNil() { + o.BootOrder = &Nilstring +} + +// HasBootOrder returns a boolean if a field has been set. +func (o *VolumeProperties) HasBootOrder() bool { + if o != nil && o.BootOrder != nil { return true } return false } -// GetAvailabilityZone returns the AvailabilityZone field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetAvailabilityZone() *string { +// GetBootServer returns the BootServer field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetBootServer() *string { if o == nil { return nil } - return o.AvailabilityZone + return o.BootServer } -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// GetBootServerOk returns a tuple with the BootServer field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetAvailabilityZoneOk() (*string, bool) { +func (o *VolumeProperties) GetBootServerOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailabilityZone, true + return o.BootServer, true } -// SetAvailabilityZone sets field value -func (o *VolumeProperties) SetAvailabilityZone(v string) { +// SetBootServer sets field value +func (o *VolumeProperties) SetBootServer(v string) { - o.AvailabilityZone = &v + o.BootServer = &v } -// HasAvailabilityZone returns a boolean if a field has been set. -func (o *VolumeProperties) HasAvailabilityZone() bool { - if o != nil && o.AvailabilityZone != nil { +// HasBootServer returns a boolean if a field has been set. +func (o *VolumeProperties) HasBootServer() bool { + if o != nil && o.BootServer != nil { return true } return false } -// GetImage returns the Image field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetImage() *string { +// GetBus returns the Bus field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetBus() *string { if o == nil { return nil } - return o.Image + return o.Bus } -// GetImageOk returns a tuple with the Image field value +// GetBusOk returns a tuple with the Bus field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetImageOk() (*string, bool) { +func (o *VolumeProperties) GetBusOk() (*string, bool) { if o == nil { return nil, false } - return o.Image, true + return o.Bus, true } -// SetImage sets field value -func (o *VolumeProperties) SetImage(v string) { +// SetBus sets field value +func (o *VolumeProperties) SetBus(v string) { - o.Image = &v + o.Bus = &v } -// HasImage returns a boolean if a field has been set. -func (o *VolumeProperties) HasImage() bool { - if o != nil && o.Image != nil { +// HasBus returns a boolean if a field has been set. +func (o *VolumeProperties) HasBus() bool { + if o != nil && o.Bus != nil { return true } return false } -// GetImagePassword returns the ImagePassword field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetImagePassword() *string { +// GetCpuHotPlug returns the CpuHotPlug field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetCpuHotPlug() *bool { if o == nil { return nil } - return o.ImagePassword + return o.CpuHotPlug } -// GetImagePasswordOk returns a tuple with the ImagePassword field value +// GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetImagePasswordOk() (*string, bool) { +func (o *VolumeProperties) GetCpuHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.ImagePassword, true + return o.CpuHotPlug, true } -// SetImagePassword sets field value -func (o *VolumeProperties) SetImagePassword(v string) { +// SetCpuHotPlug sets field value +func (o *VolumeProperties) SetCpuHotPlug(v bool) { - o.ImagePassword = &v + o.CpuHotPlug = &v } -// HasImagePassword returns a boolean if a field has been set. -func (o *VolumeProperties) HasImagePassword() bool { - if o != nil && o.ImagePassword != nil { +// HasCpuHotPlug returns a boolean if a field has been set. +func (o *VolumeProperties) HasCpuHotPlug() bool { + if o != nil && o.CpuHotPlug != nil { return true } return false } -// GetImageAlias returns the ImageAlias field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetImageAlias() *string { +// GetDeviceNumber returns the DeviceNumber field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetDeviceNumber() *int64 { if o == nil { return nil } - return o.ImageAlias + return o.DeviceNumber } -// GetImageAliasOk returns a tuple with the ImageAlias field value +// GetDeviceNumberOk returns a tuple with the DeviceNumber field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetImageAliasOk() (*string, bool) { +func (o *VolumeProperties) GetDeviceNumberOk() (*int64, bool) { if o == nil { return nil, false } - return o.ImageAlias, true + return o.DeviceNumber, true } -// SetImageAlias sets field value -func (o *VolumeProperties) SetImageAlias(v string) { +// SetDeviceNumber sets field value +func (o *VolumeProperties) SetDeviceNumber(v int64) { - o.ImageAlias = &v + o.DeviceNumber = &v } -// HasImageAlias returns a boolean if a field has been set. -func (o *VolumeProperties) HasImageAlias() bool { - if o != nil && o.ImageAlias != nil { +// HasDeviceNumber returns a boolean if a field has been set. +func (o *VolumeProperties) HasDeviceNumber() bool { + if o != nil && o.DeviceNumber != nil { return true } return false } -// GetSshKeys returns the SshKeys field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *VolumeProperties) GetSshKeys() *[]string { +// GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetDiscVirtioHotPlug() *bool { if o == nil { return nil } - return o.SshKeys + return o.DiscVirtioHotPlug } -// GetSshKeysOk returns a tuple with the SshKeys field value +// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetSshKeysOk() (*[]string, bool) { +func (o *VolumeProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.SshKeys, true + return o.DiscVirtioHotPlug, true } -// SetSshKeys sets field value -func (o *VolumeProperties) SetSshKeys(v []string) { +// SetDiscVirtioHotPlug sets field value +func (o *VolumeProperties) SetDiscVirtioHotPlug(v bool) { - o.SshKeys = &v + o.DiscVirtioHotPlug = &v } -// HasSshKeys returns a boolean if a field has been set. -func (o *VolumeProperties) HasSshKeys() bool { - if o != nil && o.SshKeys != nil { +// HasDiscVirtioHotPlug returns a boolean if a field has been set. +func (o *VolumeProperties) HasDiscVirtioHotPlug() bool { + if o != nil && o.DiscVirtioHotPlug != nil { return true } return false } -// GetBus returns the Bus field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetBus() *string { +// GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetDiscVirtioHotUnplug() *bool { if o == nil { return nil } - return o.Bus + return o.DiscVirtioHotUnplug } -// GetBusOk returns a tuple with the Bus field value +// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetBusOk() (*string, bool) { +func (o *VolumeProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.Bus, true + return o.DiscVirtioHotUnplug, true } -// SetBus sets field value -func (o *VolumeProperties) SetBus(v string) { +// SetDiscVirtioHotUnplug sets field value +func (o *VolumeProperties) SetDiscVirtioHotUnplug(v bool) { - o.Bus = &v + o.DiscVirtioHotUnplug = &v } -// HasBus returns a boolean if a field has been set. -func (o *VolumeProperties) HasBus() bool { - if o != nil && o.Bus != nil { +// HasDiscVirtioHotUnplug returns a boolean if a field has been set. +func (o *VolumeProperties) HasDiscVirtioHotUnplug() bool { + if o != nil && o.DiscVirtioHotUnplug != nil { return true } return false } -// GetLicenceType returns the LicenceType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetLicenceType() *string { +// GetImage returns the Image field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetImage() *string { if o == nil { return nil } - return o.LicenceType + return o.Image } -// GetLicenceTypeOk returns a tuple with the LicenceType field value +// GetImageOk returns a tuple with the Image field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetLicenceTypeOk() (*string, bool) { +func (o *VolumeProperties) GetImageOk() (*string, bool) { if o == nil { return nil, false } - return o.LicenceType, true + return o.Image, true } -// SetLicenceType sets field value -func (o *VolumeProperties) SetLicenceType(v string) { +// SetImage sets field value +func (o *VolumeProperties) SetImage(v string) { - o.LicenceType = &v + o.Image = &v } -// HasLicenceType returns a boolean if a field has been set. -func (o *VolumeProperties) HasLicenceType() bool { - if o != nil && o.LicenceType != nil { +// HasImage returns a boolean if a field has been set. +func (o *VolumeProperties) HasImage() bool { + if o != nil && o.Image != nil { return true } return false } -// GetCpuHotPlug returns the CpuHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *VolumeProperties) GetCpuHotPlug() *bool { +// GetImageAlias returns the ImageAlias field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetImageAlias() *string { if o == nil { return nil } - return o.CpuHotPlug + return o.ImageAlias } -// GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value +// GetImageAliasOk returns a tuple with the ImageAlias field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetCpuHotPlugOk() (*bool, bool) { +func (o *VolumeProperties) GetImageAliasOk() (*string, bool) { if o == nil { return nil, false } - return o.CpuHotPlug, true + return o.ImageAlias, true } -// SetCpuHotPlug sets field value -func (o *VolumeProperties) SetCpuHotPlug(v bool) { +// SetImageAlias sets field value +func (o *VolumeProperties) SetImageAlias(v string) { - o.CpuHotPlug = &v + o.ImageAlias = &v } -// HasCpuHotPlug returns a boolean if a field has been set. -func (o *VolumeProperties) HasCpuHotPlug() bool { - if o != nil && o.CpuHotPlug != nil { +// HasImageAlias returns a boolean if a field has been set. +func (o *VolumeProperties) HasImageAlias() bool { + if o != nil && o.ImageAlias != nil { return true } return false } -// GetRamHotPlug returns the RamHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *VolumeProperties) GetRamHotPlug() *bool { +// GetImagePassword returns the ImagePassword field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetImagePassword() *string { if o == nil { return nil } - return o.RamHotPlug + return o.ImagePassword + +} + +// GetImagePasswordOk returns a tuple with the ImagePassword field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VolumeProperties) GetImagePasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.ImagePassword, true +} + +// SetImagePassword sets field value +func (o *VolumeProperties) SetImagePassword(v string) { + + o.ImagePassword = &v + +} + +// HasImagePassword returns a boolean if a field has been set. +func (o *VolumeProperties) HasImagePassword() bool { + if o != nil && o.ImagePassword != nil { + return true + } + + return false +} + +// GetLicenceType returns the LicenceType field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetLicenceType() *string { + if o == nil { + return nil + } + + return o.LicenceType + +} + +// GetLicenceTypeOk returns a tuple with the LicenceType field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VolumeProperties) GetLicenceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.LicenceType, true +} + +// SetLicenceType sets field value +func (o *VolumeProperties) SetLicenceType(v string) { + + o.LicenceType = &v + +} + +// HasLicenceType returns a boolean if a field has been set. +func (o *VolumeProperties) HasLicenceType() bool { + if o != nil && o.LicenceType != nil { + return true + } + + return false +} + +// GetName returns the Name field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetName() *string { + if o == nil { + return nil + } + + return o.Name } -// GetRamHotPlugOk returns a tuple with the RamHotPlug field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetRamHotPlugOk() (*bool, bool) { +func (o *VolumeProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.RamHotPlug, true + return o.Name, true } -// SetRamHotPlug sets field value -func (o *VolumeProperties) SetRamHotPlug(v bool) { +// SetName sets field value +func (o *VolumeProperties) SetName(v string) { - o.RamHotPlug = &v + o.Name = &v } -// HasRamHotPlug returns a boolean if a field has been set. -func (o *VolumeProperties) HasRamHotPlug() bool { - if o != nil && o.RamHotPlug != nil { +// HasName returns a boolean if a field has been set. +func (o *VolumeProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -536,7 +624,7 @@ func (o *VolumeProperties) HasRamHotPlug() bool { } // GetNicHotPlug returns the NicHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *VolumeProperties) GetNicHotPlug() *bool { if o == nil { return nil @@ -574,7 +662,7 @@ func (o *VolumeProperties) HasNicHotPlug() bool { } // GetNicHotUnplug returns the NicHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned +// If the value is explicit nil, nil is returned func (o *VolumeProperties) GetNicHotUnplug() *bool { if o == nil { return nil @@ -611,190 +699,190 @@ func (o *VolumeProperties) HasNicHotUnplug() bool { return false } -// GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *VolumeProperties) GetDiscVirtioHotPlug() *bool { +// GetPciSlot returns the PciSlot field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetPciSlot() *int32 { if o == nil { return nil } - return o.DiscVirtioHotPlug + return o.PciSlot } -// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value +// GetPciSlotOk returns a tuple with the PciSlot field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { +func (o *VolumeProperties) GetPciSlotOk() (*int32, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotPlug, true + return o.PciSlot, true } -// SetDiscVirtioHotPlug sets field value -func (o *VolumeProperties) SetDiscVirtioHotPlug(v bool) { +// SetPciSlot sets field value +func (o *VolumeProperties) SetPciSlot(v int32) { - o.DiscVirtioHotPlug = &v + o.PciSlot = &v } -// HasDiscVirtioHotPlug returns a boolean if a field has been set. -func (o *VolumeProperties) HasDiscVirtioHotPlug() bool { - if o != nil && o.DiscVirtioHotPlug != nil { +// HasPciSlot returns a boolean if a field has been set. +func (o *VolumeProperties) HasPciSlot() bool { + if o != nil && o.PciSlot != nil { return true } return false } -// GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *VolumeProperties) GetDiscVirtioHotUnplug() *bool { +// GetRamHotPlug returns the RamHotPlug field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetRamHotPlug() *bool { if o == nil { return nil } - return o.DiscVirtioHotUnplug + return o.RamHotPlug } -// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value +// GetRamHotPlugOk returns a tuple with the RamHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { +func (o *VolumeProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotUnplug, true + return o.RamHotPlug, true } -// SetDiscVirtioHotUnplug sets field value -func (o *VolumeProperties) SetDiscVirtioHotUnplug(v bool) { +// SetRamHotPlug sets field value +func (o *VolumeProperties) SetRamHotPlug(v bool) { - o.DiscVirtioHotUnplug = &v + o.RamHotPlug = &v } -// HasDiscVirtioHotUnplug returns a boolean if a field has been set. -func (o *VolumeProperties) HasDiscVirtioHotUnplug() bool { - if o != nil && o.DiscVirtioHotUnplug != nil { +// HasRamHotPlug returns a boolean if a field has been set. +func (o *VolumeProperties) HasRamHotPlug() bool { + if o != nil && o.RamHotPlug != nil { return true } return false } -// GetDeviceNumber returns the DeviceNumber field value -// If the value is explicit nil, the zero value for int64 will be returned -func (o *VolumeProperties) GetDeviceNumber() *int64 { +// GetSize returns the Size field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetSize() *float32 { if o == nil { return nil } - return o.DeviceNumber + return o.Size } -// GetDeviceNumberOk returns a tuple with the DeviceNumber field value +// GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetDeviceNumberOk() (*int64, bool) { +func (o *VolumeProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } - return o.DeviceNumber, true + return o.Size, true } -// SetDeviceNumber sets field value -func (o *VolumeProperties) SetDeviceNumber(v int64) { +// SetSize sets field value +func (o *VolumeProperties) SetSize(v float32) { - o.DeviceNumber = &v + o.Size = &v } -// HasDeviceNumber returns a boolean if a field has been set. -func (o *VolumeProperties) HasDeviceNumber() bool { - if o != nil && o.DeviceNumber != nil { +// HasSize returns a boolean if a field has been set. +func (o *VolumeProperties) HasSize() bool { + if o != nil && o.Size != nil { return true } return false } -// GetPciSlot returns the PciSlot field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *VolumeProperties) GetPciSlot() *int32 { +// GetSshKeys returns the SshKeys field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetSshKeys() *[]string { if o == nil { return nil } - return o.PciSlot + return o.SshKeys } -// GetPciSlotOk returns a tuple with the PciSlot field value +// GetSshKeysOk returns a tuple with the SshKeys field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetPciSlotOk() (*int32, bool) { +func (o *VolumeProperties) GetSshKeysOk() (*[]string, bool) { if o == nil { return nil, false } - return o.PciSlot, true + return o.SshKeys, true } -// SetPciSlot sets field value -func (o *VolumeProperties) SetPciSlot(v int32) { +// SetSshKeys sets field value +func (o *VolumeProperties) SetSshKeys(v []string) { - o.PciSlot = &v + o.SshKeys = &v } -// HasPciSlot returns a boolean if a field has been set. -func (o *VolumeProperties) HasPciSlot() bool { - if o != nil && o.PciSlot != nil { +// HasSshKeys returns a boolean if a field has been set. +func (o *VolumeProperties) HasSshKeys() bool { + if o != nil && o.SshKeys != nil { return true } return false } -// GetBackupunitId returns the BackupunitId field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetBackupunitId() *string { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetType() *string { if o == nil { return nil } - return o.BackupunitId + return o.Type } -// GetBackupunitIdOk returns a tuple with the BackupunitId field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetBackupunitIdOk() (*string, bool) { +func (o *VolumeProperties) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.BackupunitId, true + return o.Type, true } -// SetBackupunitId sets field value -func (o *VolumeProperties) SetBackupunitId(v string) { +// SetType sets field value +func (o *VolumeProperties) SetType(v string) { - o.BackupunitId = &v + o.Type = &v } -// HasBackupunitId returns a boolean if a field has been set. -func (o *VolumeProperties) HasBackupunitId() bool { - if o != nil && o.BackupunitId != nil { +// HasType returns a boolean if a field has been set. +func (o *VolumeProperties) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -802,7 +890,7 @@ func (o *VolumeProperties) HasBackupunitId() bool { } // GetUserData returns the UserData field value -// If the value is explicit nil, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *VolumeProperties) GetUserData() *string { if o == nil { return nil @@ -839,109 +927,97 @@ func (o *VolumeProperties) HasUserData() bool { return false } -// GetBootServer returns the BootServer field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetBootServer() *string { - if o == nil { - return nil +func (o VolumeProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AvailabilityZone != nil { + toSerialize["availabilityZone"] = o.AvailabilityZone } - return o.BootServer - -} - -// GetBootServerOk returns a tuple with the BootServer field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VolumeProperties) GetBootServerOk() (*string, bool) { - if o == nil { - return nil, false + if o.BackupunitId != nil { + toSerialize["backupunitId"] = o.BackupunitId } - return o.BootServer, true -} - -// SetBootServer sets field value -func (o *VolumeProperties) SetBootServer(v string) { - - o.BootServer = &v - -} - -// HasBootServer returns a boolean if a field has been set. -func (o *VolumeProperties) HasBootServer() bool { - if o != nil && o.BootServer != nil { - return true + if o.BootOrder == &Nilstring { + toSerialize["bootOrder"] = nil + } else if o.BootOrder != nil { + toSerialize["bootOrder"] = o.BootOrder + } + if o.BootServer != nil { + toSerialize["bootServer"] = o.BootServer } - return false -} + if o.Bus != nil { + toSerialize["bus"] = o.Bus + } -func (o VolumeProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.CpuHotPlug != nil { + toSerialize["cpuHotPlug"] = o.CpuHotPlug } - if o.Type != nil { - toSerialize["type"] = o.Type + + if o.DeviceNumber != nil { + toSerialize["deviceNumber"] = o.DeviceNumber } - if o.Size != nil { - toSerialize["size"] = o.Size + + if o.DiscVirtioHotPlug != nil { + toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug } - if o.AvailabilityZone != nil { - toSerialize["availabilityZone"] = o.AvailabilityZone + + if o.DiscVirtioHotUnplug != nil { + toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug } + if o.Image != nil { toSerialize["image"] = o.Image } - if o.ImagePassword != nil { - toSerialize["imagePassword"] = o.ImagePassword - } + if o.ImageAlias != nil { toSerialize["imageAlias"] = o.ImageAlias } - if o.SshKeys != nil { - toSerialize["sshKeys"] = o.SshKeys - } - if o.Bus != nil { - toSerialize["bus"] = o.Bus + + if o.ImagePassword != nil { + toSerialize["imagePassword"] = o.ImagePassword } + if o.LicenceType != nil { toSerialize["licenceType"] = o.LicenceType } - if o.CpuHotPlug != nil { - toSerialize["cpuHotPlug"] = o.CpuHotPlug - } - if o.RamHotPlug != nil { - toSerialize["ramHotPlug"] = o.RamHotPlug + + if o.Name != nil { + toSerialize["name"] = o.Name } + if o.NicHotPlug != nil { toSerialize["nicHotPlug"] = o.NicHotPlug } + if o.NicHotUnplug != nil { toSerialize["nicHotUnplug"] = o.NicHotUnplug } - if o.DiscVirtioHotPlug != nil { - toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug + + if o.PciSlot != nil { + toSerialize["pciSlot"] = o.PciSlot } - if o.DiscVirtioHotUnplug != nil { - toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug + + if o.RamHotPlug != nil { + toSerialize["ramHotPlug"] = o.RamHotPlug } - if o.DeviceNumber != nil { - toSerialize["deviceNumber"] = o.DeviceNumber + + if o.Size != nil { + toSerialize["size"] = o.Size } - if o.PciSlot != nil { - toSerialize["pciSlot"] = o.PciSlot + + if o.SshKeys != nil { + toSerialize["sshKeys"] = o.SshKeys } - if o.BackupunitId != nil { - toSerialize["backupunitId"] = o.BackupunitId + + if o.Type != nil { + toSerialize["type"] = o.Type } + if o.UserData != nil { toSerialize["userData"] = o.UserData } - if o.BootServer != nil { - toSerialize["bootServer"] = o.BootServer - } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volumes.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volumes.go index dfe753d8e6de..ec795374f241 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volumes.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/model_volumes.go @@ -16,19 +16,19 @@ import ( // Volumes struct for Volumes type Volumes struct { - // The resource's unique identifier. - Id *string `json:"id,omitempty"` - // The type of object that has been created. - Type *Type `json:"type,omitempty"` + Links *PaginationLinks `json:"_links,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` + // The resource's unique identifier. + Id *string `json:"id,omitempty"` // Array of items in the collection. Items *[]Volume `json:"items,omitempty"` + // The limit (if specified in the request). + Limit *float32 `json:"limit,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` - // The limit (if specified in the request). - Limit *float32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewVolumes instantiates a new Volumes object @@ -49,114 +49,114 @@ func NewVolumesWithDefaults() *Volumes { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Volumes) GetId() *string { +// GetLinks returns the Links field value +// If the value is explicit nil, nil is returned +func (o *Volumes) GetLinks() *PaginationLinks { if o == nil { return nil } - return o.Id + return o.Links } -// GetIdOk returns a tuple with the Id field value +// GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volumes) GetIdOk() (*string, bool) { +func (o *Volumes) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *Volumes) SetId(v string) { +// SetLinks sets field value +func (o *Volumes) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *Volumes) HasId() bool { - if o != nil && o.Id != nil { +// HasLinks returns a boolean if a field has been set. +func (o *Volumes) HasLinks() bool { + if o != nil && o.Links != nil { return true } return false } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *Volumes) GetType() *Type { +// GetHref returns the Href field value +// If the value is explicit nil, nil is returned +func (o *Volumes) GetHref() *string { if o == nil { return nil } - return o.Type + return o.Href } -// GetTypeOk returns a tuple with the Type field value +// GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volumes) GetTypeOk() (*Type, bool) { +func (o *Volumes) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *Volumes) SetType(v Type) { +// SetHref sets field value +func (o *Volumes) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *Volumes) HasType() bool { - if o != nil && o.Type != nil { +// HasHref returns a boolean if a field has been set. +func (o *Volumes) HasHref() bool { + if o != nil && o.Href != nil { return true } return false } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *Volumes) GetHref() *string { +// GetId returns the Id field value +// If the value is explicit nil, nil is returned +func (o *Volumes) GetId() *string { if o == nil { return nil } - return o.Href + return o.Id } -// GetHrefOk returns a tuple with the Href field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volumes) GetHrefOk() (*string, bool) { +func (o *Volumes) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *Volumes) SetHref(v string) { +// SetId sets field value +func (o *Volumes) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *Volumes) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *Volumes) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *Volumes) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []Volume will be returned +// If the value is explicit nil, nil is returned func (o *Volumes) GetItems() *[]Volume { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *Volumes) HasItems() bool { return false } -// GetOffset returns the Offset field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Volumes) GetOffset() *float32 { +// GetLimit returns the Limit field value +// If the value is explicit nil, nil is returned +func (o *Volumes) GetLimit() *float32 { if o == nil { return nil } - return o.Offset + return o.Limit } -// GetOffsetOk returns a tuple with the Offset field value +// GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volumes) GetOffsetOk() (*float32, bool) { +func (o *Volumes) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *Volumes) SetOffset(v float32) { +// SetLimit sets field value +func (o *Volumes) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *Volumes) HasOffset() bool { - if o != nil && o.Offset != nil { +// HasLimit returns a boolean if a field has been set. +func (o *Volumes) HasLimit() bool { + if o != nil && o.Limit != nil { return true } return false } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *Volumes) GetLimit() *float32 { +// GetOffset returns the Offset field value +// If the value is explicit nil, nil is returned +func (o *Volumes) GetOffset() *float32 { if o == nil { return nil } - return o.Limit + return o.Offset } -// GetLimitOk returns a tuple with the Limit field value +// GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volumes) GetLimitOk() (*float32, bool) { +func (o *Volumes) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *Volumes) SetLimit(v float32) { +// SetOffset sets field value +func (o *Volumes) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *Volumes) HasLimit() bool { - if o != nil && o.Limit != nil { +// HasOffset returns a boolean if a field has been set. +func (o *Volumes) HasOffset() bool { + if o != nil && o.Offset != nil { return true } return false } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *Volumes) GetLinks() *PaginationLinks { +// GetType returns the Type field value +// If the value is explicit nil, nil is returned +func (o *Volumes) GetType() *Type { if o == nil { return nil } - return o.Links + return o.Type } -// GetLinksOk returns a tuple with the Links field value +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Volumes) GetLinksOk() (*PaginationLinks, bool) { +func (o *Volumes) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *Volumes) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *Volumes) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *Volumes) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *Volumes) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *Volumes) HasLinks() bool { func (o Volumes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Links != nil { + toSerialize["_links"] = o.Links } + if o.Href != nil { toSerialize["href"] = o.Href } + + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Items != nil { toSerialize["items"] = o.Items } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } + if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.Links != nil { - toSerialize["_links"] = o.Links + + if o.Offset != nil { + toSerialize["offset"] = o.Offset } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/response.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/response.go index 30e3c36753b6..277843b141df 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/response.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/response.go @@ -11,6 +11,7 @@ package ionoscloud import ( + "log" "net/http" "time" ) @@ -49,3 +50,24 @@ func NewAPIResponseWithError(errorMessage string) *APIResponse { response := &APIResponse{Message: errorMessage} return response } + +// HttpNotFound - returns true if a 404 status code was returned +// returns false for nil APIResponse values +func (resp *APIResponse) HttpNotFound() bool { + if resp != nil && resp.Response != nil && resp.StatusCode == http.StatusNotFound { + return true + } + return false +} + +// LogInfo - logs APIResponse values like RequestTime, Operation and StatusCode +// does not print anything for nil APIResponse values +func (resp *APIResponse) LogInfo() { + if resp != nil { + log.Printf("[DEBUG] Request time : %s for operation : %s", + resp.RequestTime, resp.Operation) + if resp.Response != nil { + log.Printf("[DEBUG] response status code : %d\n", resp.StatusCode) + } + } +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/utils.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/utils.go index aa9652cd5578..08c0967d4a30 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/utils.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go/utils.go @@ -12,10 +12,42 @@ package ionoscloud import ( "encoding/json" + "reflect" "strings" "time" ) +var ( + // used to set a nullable field to nil. This is a sentinel address that will be checked in the MarshalJson function. + // if set to this address, a nil value will be marshalled + Nilstring string = "<>" + Nilint32 int32 = -334455 + Nilbool bool = false +) + +// ToPtr - returns a pointer to the given value. +func ToPtr[T any](v T) *T { + return &v +} + +// ToValue - returns the value of the pointer passed in +func ToValue[T any](ptr *T) T { + return *ptr +} + +// ToValueDefault - returns the value of the pointer passed in, or the default type value if the pointer is nil +func ToValueDefault[T any](ptr *T) T { + var defaultVal T + if ptr == nil { + return defaultVal + } + return *ptr +} + +func SliceToValueDefault[T any](ptrSlice *[]T) []T { + return append([]T{}, *ptrSlice...) +} + // PtrBool - returns a pointer to given boolean value. func PtrBool(v bool) *bool { return &v } @@ -742,3 +774,17 @@ func (t *IonosTime) UnmarshalJSON(data []byte) error { *t = IonosTime{tt} return nil } + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go index fe0dcfe82ea6..54f8be9d6c6b 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go @@ -17,13 +17,14 @@ limitations under the License. package ionoscloud import ( + "errors" "fmt" apiv1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" "k8s.io/autoscaler/cluster-autoscaler/config" - "k8s.io/autoscaler/cluster-autoscaler/utils/errors" + caerrors "k8s.io/autoscaler/cluster-autoscaler/utils/errors" "k8s.io/autoscaler/cluster-autoscaler/utils/gpu" "k8s.io/klog/v2" schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" @@ -35,11 +36,11 @@ const ( ) type nodePool struct { + manager IonosCloudManager + id string min int max int - - manager IonosCloudManager } var _ cloudprovider.NodeGroup = &nodePool{} @@ -68,7 +69,7 @@ func (n *nodePool) TargetSize() (int, error) { // node group size is updated. Implementation required. func (n *nodePool) IncreaseSize(delta int) error { if delta <= 0 { - return fmt.Errorf("size increase must be positive") + return errors.New("size increase must be positive") } size, err := n.manager.GetNodeGroupSize(n) if err != nil { @@ -87,13 +88,13 @@ func (n *nodePool) IncreaseSize(delta int) error { // until node group size is updated. Implementation required. func (n *nodePool) DeleteNodes(nodes []*apiv1.Node) error { if acquired := n.manager.TryLockNodeGroup(n); !acquired { - return fmt.Errorf("node deletion already in progress") + return errors.New("node deletion already in progress") } defer n.manager.UnlockNodeGroup(n) for _, node := range nodes { - nodeId := convertToNodeId(node.Spec.ProviderID) - if err := n.manager.DeleteNode(n, nodeId); err != nil { + nodeID := convertToNodeID(node.Spec.ProviderID) + if err := n.manager.DeleteNode(n, nodeID); err != nil { return err } } @@ -107,7 +108,7 @@ func (n *nodePool) DeleteNodes(nodes []*apiv1.Node) error { // is an option to just decrease the target size. Implementation required. func (n *nodePool) DecreaseTargetSize(delta int) error { if delta >= 0 { - return fmt.Errorf("size decrease must be negative") + return errors.New("size decrease must be negative") } size, err := n.manager.GetNodeGroupTargetSize(n) if err != nil { @@ -117,7 +118,7 @@ func (n *nodePool) DecreaseTargetSize(delta int) error { return fmt.Errorf("size decrease exceeds lower bound of %d", n.min) } // IonosCloud does not allow modification of the target size while nodes are being provisioned. - return fmt.Errorf("currently not supported behavior") + return errors.New("currently not supported behavior") } // Id returns an unique identifier of the node group. @@ -127,7 +128,7 @@ func (n *nodePool) Id() string { // Debug returns a string containing all information regarding this node group. func (n *nodePool) Debug() string { - return fmt.Sprintf("Id=%s, Min=%d, Max=%d", n.id, n.min, n.max) + return fmt.Sprintf("ID=%s, Min=%d, Max=%d", n.id, n.min, n.max) } // Nodes returns a list of all nodes that belong to this node group. @@ -176,7 +177,7 @@ func (n *nodePool) Autoprovisioned() bool { // GetOptions returns NodeGroupAutoscalingOptions that should be used for this particular // NodeGroup. Returning a nil will result in using default options. func (n *nodePool) GetOptions(defaults config.NodeGroupAutoscalingOptions) (*config.NodeGroupAutoscalingOptions, error) { - return nil, cloudprovider.ErrNotImplemented + return nil, nil } // IonosCloudCloudProvider implements cloudprovider.CloudProvider. @@ -240,7 +241,7 @@ func (ic *IonosCloudCloudProvider) HasInstance(node *apiv1.Node) (bool, error) { // Pricing returns pricing model for this cloud provider or error if not // available. Implementation optional. -func (ic *IonosCloudCloudProvider) Pricing() (cloudprovider.PricingModel, errors.AutoscalerError) { +func (ic *IonosCloudCloudProvider) Pricing() (cloudprovider.PricingModel, caerrors.AutoscalerError) { return nil, cloudprovider.ErrNotImplemented } @@ -303,7 +304,7 @@ func (ic *IonosCloudCloudProvider) Refresh() error { // BuildIonosCloud builds the IonosCloud cloud provider. func BuildIonosCloud( opts config.AutoscalingOptions, - do cloudprovider.NodeGroupDiscoveryOptions, + _ cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter, ) cloudprovider.CloudProvider { manager, err := CreateIonosCloudManager(opts.NodeGroups, opts.UserAgent) @@ -312,5 +313,6 @@ func BuildIonosCloud( } provider := BuildIonosCloudCloudProvider(manager, rl) + RegisterMetrics() return provider } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go index 85a2f5ef043a..712c4483c0f6 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go @@ -17,9 +17,10 @@ limitations under the License. package ionoscloud import ( - "fmt" + "errors" "testing" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" apiv1 "k8s.io/api/core/v1" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" @@ -27,12 +28,14 @@ import ( type NodeGroupTestSuite struct { suite.Suite + *require.Assertions manager *MockIonosCloudManager nodePool *nodePool deleteNode []*apiv1.Node } func (s *NodeGroupTestSuite) SetupTest() { + s.Assertions = s.Require() s.manager = NewMockIonosCloudManager(s.T()) s.nodePool = &nodePool{ id: "test", @@ -41,7 +44,7 @@ func (s *NodeGroupTestSuite) SetupTest() { manager: s.manager, } s.deleteNode = []*apiv1.Node{ - {Spec: apiv1.NodeSpec{ProviderID: convertToInstanceId("testnode")}}, + {Spec: apiv1.NodeSpec{ProviderID: convertToInstanceID("testnode")}}, } } @@ -54,7 +57,7 @@ func (s *NodeGroupTestSuite) TestId() { } func (s *NodeGroupTestSuite) TestDebug() { - s.Equal("Id=test, Min=1, Max=3", s.nodePool.Debug()) + s.Equal("ID=test, Min=1, Max=3", s.nodePool.Debug()) } func (s *NodeGroupTestSuite) TestMaxSize() { @@ -93,7 +96,7 @@ func (s *NodeGroupTestSuite) TestAutoprovisioned() { } func (s *NodeGroupTestSuite) TestTargetSize_Error() { - s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(0, fmt.Errorf("error")).Once() + s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(0, errors.New("error")).Once() _, err := s.nodePool.TargetSize() s.Error(err) } @@ -110,7 +113,7 @@ func (s *NodeGroupTestSuite) TestIncreaseSize_InvalidDelta() { } func (s *NodeGroupTestSuite) TestIncreaseSize_GetSizeError() { - s.manager.On("GetNodeGroupSize", s.nodePool).Return(0, fmt.Errorf("error")).Once() + s.manager.On("GetNodeGroupSize", s.nodePool).Return(0, errors.New("error")).Once() s.Error(s.nodePool.IncreaseSize(2)) } @@ -121,7 +124,7 @@ func (s *NodeGroupTestSuite) TestIncreaseSize_ExceedMax() { func (s *NodeGroupTestSuite) TestIncreaseSize_SetSizeError() { s.manager.On("GetNodeGroupSize", s.nodePool).Return(2, nil).Once() - s.manager.On("SetNodeGroupSize", s.nodePool, 3).Return(fmt.Errorf("error")).Once() + s.manager.On("SetNodeGroupSize", s.nodePool, 3).Return(errors.New("error")).Once() s.Error(s.nodePool.IncreaseSize(1)) } @@ -139,7 +142,7 @@ func (s *NodeGroupTestSuite) TestDeleteNodes_Locked() { func (s *NodeGroupTestSuite) TestDeleteNodes_DeleteError() { s.manager.On("TryLockNodeGroup", s.nodePool).Return(true).Once() s.manager.On("UnlockNodeGroup", s.nodePool).Return().Once() - s.manager.On("DeleteNode", s.nodePool, "testnode").Return(fmt.Errorf("error")).Once() + s.manager.On("DeleteNode", s.nodePool, "testnode").Return(errors.New("error")).Once() s.Error(s.nodePool.DeleteNodes(s.deleteNode)) } @@ -155,7 +158,7 @@ func (s *NodeGroupTestSuite) TestDecreaseTargetSize_InvalidDelta() { } func (s *NodeGroupTestSuite) TestDecreaseTargetSize_GetTargetSizeError() { - s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(0, fmt.Errorf("error")).Once() + s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(0, errors.New("error")).Once() s.Error(s.nodePool.DecreaseTargetSize(-1)) } @@ -171,11 +174,13 @@ func (s *NodeGroupTestSuite) TestDecreaseTargetSize_NotImplemented() { type CloudProviderTestSuite struct { suite.Suite + *require.Assertions manager *MockIonosCloudManager provider *IonosCloudCloudProvider } func (s *CloudProviderTestSuite) SetupTest() { + s.Assertions = s.Require() s.manager = NewMockIonosCloudManager(s.T()) s.provider = BuildIonosCloudCloudProvider(s.manager, &cloudprovider.ResourceLimiter{}) } @@ -208,7 +213,7 @@ func (s *CloudProviderTestSuite) TestNodeGroupForNode_Error() { nodePool := &nodePool{id: "test", manager: s.manager} s.manager.On("GetNodeGroupForNode", node).Return(nil).Once() s.manager.On("GetNodeGroups").Return([]cloudprovider.NodeGroup{nodePool}).Once() - s.manager.On("GetInstancesForNodeGroup", nodePool).Return(nil, fmt.Errorf("error")).Once() + s.manager.On("GetInstancesForNodeGroup", nodePool).Return(nil, errors.New("error")).Once() nodeGroup, err := s.provider.NodeGroupForNode(node) s.Nil(nodeGroup) diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager.go index 4cd0eba9ffe3..5a387815938f 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager.go @@ -32,15 +32,16 @@ import ( ) const ( - envKeyClusterId = "IONOS_CLUSTER_ID" - envKeyToken = ionos.IonosTokenEnvVar - envKeyEndpoint = ionos.IonosApiUrlEnvVar - envKeyInsecure = "IONOS_INSECURE" - envKeyPollTimeout = "IONOS_POLL_TIMEOUT" - envKeyPollInterval = "IONOS_POLL_INTERVAL" - envKeyTokensPath = "IONOS_TOKENS_PATH" - defaultTimeout = 15 * time.Minute - defaultInterval = 30 * time.Second + envKeyClusterID = "IONOS_CLUSTER_ID" + envKeyToken = ionos.IonosTokenEnvVar + envKeyEndpoint = ionos.IonosApiUrlEnvVar + envKeyInsecure = "IONOS_INSECURE" + envKeyPollTimeout = "IONOS_POLL_TIMEOUT" + envKeyPollInterval = "IONOS_POLL_INTERVAL" + envKeyTokensPath = "IONOS_TOKENS_PATH" + envKeyAdditionalHeaders = "IONOS_ADDITIONAL_HEADERS" + defaultTimeout = 15 * time.Minute + defaultInterval = 30 * time.Second ) // IonosCloudManager handles IonosCloud communication and data caching of node groups. @@ -67,8 +68,8 @@ type IonosCloudManager interface { // Config holds information necessary to construct IonosCloud API clients. type Config struct { - // ClusterId is the ID of the cluster to autoscale. - ClusterId string + // ClusterID is the ID of the cluster to autoscale. + ClusterID string // Token is an IonosCloud API access token. Token string // Endpoint overrides the default API URL. @@ -81,6 +82,8 @@ type Config struct { PollInterval time.Duration // TokensPath points to a directory that contains token files TokensPath string + // AdditionalHeaders are additional HTTP headers to append to each IonosCloud API request. + AdditionalHeaders map[string]string } // LoadConfigFromEnv loads the IonosCloud client config from env. @@ -93,8 +96,8 @@ func LoadConfigFromEnv() (*Config, error) { PollTimeout: defaultTimeout, } - if config.ClusterId = os.Getenv(envKeyClusterId); config.ClusterId == "" { - return nil, fmt.Errorf("missing value for %s", envKeyClusterId) + if config.ClusterID = os.Getenv(envKeyClusterID); config.ClusterID == "" { + return nil, fmt.Errorf("missing value for %s", envKeyClusterID) } if config.Token == "" && config.TokensPath == "" { @@ -121,6 +124,22 @@ func LoadConfigFromEnv() (*Config, error) { } } + if rawHeaders := os.Getenv(envKeyAdditionalHeaders); rawHeaders != "" { + config.AdditionalHeaders = make(map[string]string) + for _, item := range strings.Split(rawHeaders, ";") { + item = strings.TrimSpace(item) + if item == "" { + // ignore empty items and trailing semicolons + continue + } + k, v, ok := strings.Cut(item, ":") + if !ok { + return nil, fmt.Errorf("missing colon in additional headers: %q", rawHeaders) + } + config.AdditionalHeaders[k] = v + } + } + return config, nil } @@ -137,11 +156,7 @@ func CreateIonosCloudManager(nodeGroupsConfig []string, userAgent string) (Ionos return nil, fmt.Errorf("failed to load config: %w", err) } - client, err := NewAutoscalingClient(config, userAgent) - if err != nil { - return nil, fmt.Errorf("failed to initialize client: %w", err) - } - manager := newManager(client) + manager := newManager(NewAutoscalingClient(config, userAgent)) if err := manager.initExplicitNodeGroups(nodeGroupsConfig); err != nil { return nil, fmt.Errorf("failed to load pre-configured node groups: %w", err) @@ -161,7 +176,7 @@ func newManager(client *AutoscalingClient) *ionosCloudManagerImpl { // The node groups are parsed from a list of strings in the format of ::. func (manager *ionosCloudManagerImpl) initExplicitNodeGroups(nodeGroupsConfig []string) error { if len(nodeGroupsConfig) == 0 { - return fmt.Errorf("missing value for --nodes flag") + return errors.New("missing value for --nodes flag") } for _, config := range nodeGroupsConfig { @@ -235,7 +250,7 @@ func (manager *ionosCloudManagerImpl) GetNodeGroupTargetSize(nodeGroup cloudprov // SetNodeGroupSize sets the node group size. func (manager *ionosCloudManagerImpl) SetNodeGroupSize(nodeGroup cloudprovider.NodeGroup, size int) error { klog.V(1).Infof("Setting node group size of %s to %d", nodeGroup.Id(), size) - if err := manager.client.ResizeNodePool(nodeGroup.Id(), size); err != nil { + if err := manager.client.ResizeNodePool(nodeGroup.Id(), int32(size)); err != nil { return fmt.Errorf("node group resize failed: %w", err) } manager.cache.InvalidateNodeGroupTargetSize(nodeGroup.Id()) @@ -250,23 +265,23 @@ func (manager *ionosCloudManagerImpl) SetNodeGroupSize(nodeGroup cloudprovider.N } // DeleteNode deletes a single node. -func (manager *ionosCloudManagerImpl) DeleteNode(nodeGroup cloudprovider.NodeGroup, nodeId string) error { - klog.V(1).Infof("Deleting node %s from node group %s", nodeId, nodeGroup.Id()) +func (manager *ionosCloudManagerImpl) DeleteNode(nodeGroup cloudprovider.NodeGroup, nodeID string) error { + klog.V(1).Infof("Deleting node %s from node group %s", nodeID, nodeGroup.Id()) size, err := manager.GetNodeGroupSize(nodeGroup) if err != nil { return err } manager.cache.InvalidateNodeGroupTargetSize(nodeGroup.Id()) - if err := manager.client.DeleteNode(nodeGroup.Id(), nodeId); err != nil { - return fmt.Errorf("delete node %s failed: %w", nodeId, err) + if err := manager.client.DeleteNode(nodeGroup.Id(), nodeID); err != nil { + return fmt.Errorf("delete node %s failed: %w", nodeID, err) } targetSize := size - 1 if err := manager.client.WaitForNodePoolResize(nodeGroup.Id(), targetSize); err != nil { return err } manager.cache.SetNodeGroupSize(nodeGroup.Id(), targetSize) - manager.cache.RemoveInstanceFromCache(nodeId) - klog.V(1).Infof("Successfully deleted node %s from node group %s", nodeId, nodeGroup.Id()) + manager.cache.RemoveInstanceFromCache(nodeID) + klog.V(1).Infof("Successfully deleted node %s from node group %s", nodeID, nodeGroup.Id()) return nil } @@ -276,18 +291,8 @@ func (manager *ionosCloudManagerImpl) GetInstancesForNodeGroup(nodeGroup cloudpr } func (manager *ionosCloudManagerImpl) GetNodeGroupForNode(node *apiv1.Node) cloudprovider.NodeGroup { - nodeId := convertToNodeId(node.Spec.ProviderID) - return manager.cache.GetNodeGroupForNode(nodeId) -} - -// Refreshes the cache holding the instances for the configured node groups. -func (manager *ionosCloudManagerImpl) Refresh() error { - for _, id := range manager.cache.GetNodeGroupIds() { - if err := manager.refreshInstancesForNodeGroup(id); err != nil { - return err - } - } - return nil + nodeID := convertToNodeID(node.Spec.ProviderID) + return manager.cache.GetNodeGroupForNode(nodeID) } func (manager *ionosCloudManagerImpl) refreshInstancesForNodeGroup(id string) error { diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go index 6ca53ba0fe63..64be7319d4c6 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go @@ -19,10 +19,11 @@ package ionoscloud import ( "context" "errors" - "fmt" + "net/http" "testing" "time" + "github.com/google/uuid" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -30,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ) var ( @@ -51,32 +52,37 @@ func TestLoadConfigFromEnv(t *testing.T) { }, { name: "missing both token and tokens path", - env: map[string]string{envKeyClusterId: "1"}, + env: map[string]string{envKeyClusterID: "1"}, expectErr: true, }, { name: "invalid value for insecure", - env: map[string]string{envKeyClusterId: "1", envKeyToken: "token", envKeyInsecure: "fasle"}, + env: map[string]string{envKeyClusterID: "1", envKeyToken: "token", envKeyInsecure: "fasle"}, expectErr: true, }, { name: "invalid value for interval", - env: map[string]string{envKeyClusterId: "1", envKeyToken: "token", envKeyPollInterval: "10Ghz"}, + env: map[string]string{envKeyClusterID: "1", envKeyToken: "token", envKeyPollInterval: "10Ghz"}, expectErr: true, }, { name: "invalid value for timeout", - env: map[string]string{envKeyClusterId: "1", envKeyToken: "token", envKeyPollTimeout: "1ly"}, + env: map[string]string{envKeyClusterID: "1", envKeyToken: "token", envKeyPollTimeout: "1ly"}, + expectErr: true, + }, + { + name: "invalid header format", + env: map[string]string{envKeyClusterID: "1", envKeyToken: "token", envKeyAdditionalHeaders: "foo=bar,baz=qux"}, expectErr: true, }, { name: "use defaults", env: map[string]string{ - envKeyClusterId: "test", + envKeyClusterID: "test", envKeyToken: "token", }, expectCfg: &Config{ - ClusterId: "test", + ClusterID: "test", PollInterval: defaultInterval, PollTimeout: defaultTimeout, Token: "token", @@ -85,22 +91,24 @@ func TestLoadConfigFromEnv(t *testing.T) { { name: "all fields set", env: map[string]string{ - envKeyClusterId: "test", - envKeyEndpoint: "/dev/null", - envKeyInsecure: "1", - envKeyPollInterval: "42ms", - envKeyPollTimeout: "1337s", - envKeyToken: "token", - envKeyTokensPath: "/etc/passwd", + envKeyClusterID: "test", + envKeyEndpoint: "/dev/null", + envKeyInsecure: "1", + envKeyPollInterval: "42ms", + envKeyPollTimeout: "1337s", + envKeyToken: "token", + envKeyTokensPath: "/etc/passwd", + envKeyAdditionalHeaders: "foo:bar;; baz:qux; ", }, expectCfg: &Config{ - ClusterId: "test", - Endpoint: "/dev/null", - Insecure: true, - PollInterval: 42 * time.Millisecond, - PollTimeout: 1337 * time.Second, - Token: "token", - TokensPath: "/etc/passwd", + ClusterID: "test", + Endpoint: "/dev/null", + Insecure: true, + PollInterval: 42 * time.Millisecond, + PollTimeout: 1337 * time.Second, + Token: "token", + TokensPath: "/etc/passwd", + AdditionalHeaders: map[string]string{"foo": "bar", "baz": "qux"}, }, }, } @@ -119,7 +127,7 @@ func TestLoadConfigFromEnv(t *testing.T) { } func TestCreateIonosCloudManager(t *testing.T) { - t.Setenv(envKeyClusterId, "test") + t.Setenv(envKeyClusterID, "test") t.Setenv(envKeyToken, "token") manager, err := CreateIonosCloudManager(nil, "ua") @@ -127,23 +135,23 @@ func TestCreateIonosCloudManager(t *testing.T) { require.Error(t, err) } -func newKubernetesNodePool(state string, size int) *ionos.KubernetesNodePool { +func newKubernetesNodePool(state string, size int32) *ionos.KubernetesNodePool { return &ionos.KubernetesNodePool{ - Id: pointer.StringPtr("test"), - Metadata: &ionos.DatacenterElementMetadata{State: pointer.StringPtr(state)}, - Properties: &ionos.KubernetesNodePoolProperties{NodeCount: pointer.Int32Ptr(int32(size))}, + Id: ptr.To("test"), + Metadata: &ionos.DatacenterElementMetadata{State: ptr.To(state)}, + Properties: &ionos.KubernetesNodePoolProperties{NodeCount: ptr.To(size)}, } } func newKubernetesNode(id, state string) ionos.KubernetesNode { return ionos.KubernetesNode{ - Id: pointer.StringPtr(id), - Metadata: &ionos.KubernetesNodeMetadata{State: pointer.StringPtr(state)}, + Id: ptr.To(id), + Metadata: &ionos.KubernetesNodeMetadata{State: ptr.To(state)}, } } func newInstance(id string) cloudprovider.Instance { - return cloudprovider.Instance{Id: convertToInstanceId(id)} + return cloudprovider.Instance{Id: convertToInstanceID(id)} } func newInstanceWithState(id string, state cloudprovider.InstanceState) cloudprovider.Instance { @@ -157,28 +165,37 @@ func newInstanceWithState(id string, state cloudprovider.InstanceState) cloudpro func newAPINode(id string) *apiv1.Node { return &apiv1.Node{ Spec: apiv1.NodeSpec{ - ProviderID: convertToInstanceId(id), + ProviderID: convertToInstanceID(id), + }, + } +} + +func newAPIResponse(statusCode int) *ionos.APIResponse { + return &ionos.APIResponse{ + Response: &http.Response{ + StatusCode: statusCode, }, } } type ManagerTestSuite struct { suite.Suite - client *MockAPIClient - manager *ionosCloudManagerImpl - nodePool *nodePool + *require.Assertions + mockAPIClient *MockAPIClient + manager *ionosCloudManagerImpl + nodePool *nodePool } func (s *ManagerTestSuite) SetupTest() { - s.client = NewMockAPIClient(s.T()) - client, err := NewAutoscalingClient(&Config{ - ClusterId: "cluster", + s.Assertions = s.Require() + s.mockAPIClient = NewMockAPIClient(s.T()) + client := NewAutoscalingClient(&Config{ + ClusterID: "cluster", Token: "token", PollInterval: pollInterval, PollTimeout: pollTimeout, }, "ua") - client.clientProvider = fakeClientProvider{s.client} - s.Require().NoError(err) + client.client = s.mockAPIClient s.manager = newManager(client) s.nodePool = &nodePool{ @@ -195,19 +212,27 @@ func (s *ManagerTestSuite) OnGetKubernetesNodePool(retval *ionos.KubernetesNodeP if retval != nil { nodepool = *retval } - return s.client. - On("K8sNodepoolsFindById", mock.Anything, s.manager.client.clusterId, s.nodePool.id).Return(req). - On("K8sNodepoolsFindByIdExecute", req).Return(nodepool, nil, reterr) + statusCode := 200 + if reterr != nil { + statusCode = 500 + } + return s.mockAPIClient. + On("K8sNodepoolsFindById", mock.Anything, s.manager.client.cfg.ClusterID, s.nodePool.id).Return(req). + On("K8sNodepoolsFindByIdExecute", req).Return(nodepool, newAPIResponse(statusCode), reterr) } -func (s *ManagerTestSuite) OnUpdateKubernetesNodePool(size int, reterr error) *mock.Call { +func (s *ManagerTestSuite) OnUpdateKubernetesNodePool(size int32, reterr error) *mock.Call { // use actual client here to fill in private fields cl := ionos.APIClient{}.KubernetesApi - origReq := cl.K8sNodepoolsPut(context.Background(), s.manager.client.clusterId, s.nodePool.id) + origReq := cl.K8sNodepoolsPut(context.Background(), s.manager.client.cfg.ClusterID, s.nodePool.id) expect := origReq.KubernetesNodePool(resizeRequestBody(size)) - return s.client. - On("K8sNodepoolsPut", mock.Anything, s.manager.client.clusterId, s.nodePool.id).Return(origReq). - On("K8sNodepoolsPutExecute", expect).Return(ionos.KubernetesNodePool{}, nil, reterr) + statusCode := 202 + if reterr != nil { + statusCode = 500 + } + return s.mockAPIClient. + On("K8sNodepoolsPut", mock.Anything, s.manager.client.cfg.ClusterID, s.nodePool.id).Return(origReq). + On("K8sNodepoolsPutExecute", expect).Return(ionos.KubernetesNodePool{}, newAPIResponse(statusCode), reterr) } func (s *ManagerTestSuite) OnListKubernetesNodes(retval *ionos.KubernetesNodes, reterr error) *mock.Call { @@ -217,16 +242,24 @@ func (s *ManagerTestSuite) OnListKubernetesNodes(retval *ionos.KubernetesNodes, if retval != nil { nodes = *retval } - return s.client. - On("K8sNodepoolsNodesGet", mock.Anything, s.manager.client.clusterId, s.nodePool.id).Return(origReq). - On("K8sNodepoolsNodesGetExecute", req).Return(nodes, nil, reterr) + statusCode := 200 + if reterr != nil { + statusCode = 500 + } + return s.mockAPIClient. + On("K8sNodepoolsNodesGet", mock.Anything, s.manager.client.cfg.ClusterID, s.nodePool.id).Return(origReq). + On("K8sNodepoolsNodesGetExecute", req).Return(nodes, newAPIResponse(statusCode), reterr) } func (s *ManagerTestSuite) OnDeleteKubernetesNode(id string, reterr error) *mock.Call { req := ionos.ApiK8sNodepoolsNodesDeleteRequest{} - return s.client. - On("K8sNodepoolsNodesDelete", mock.Anything, s.manager.client.clusterId, s.nodePool.id, id).Return(req). - On("K8sNodepoolsNodesDeleteExecute", req).Return(nil, reterr) + statusCode := 202 + if reterr != nil { + statusCode = 500 + } + return s.mockAPIClient. + On("K8sNodepoolsNodesDelete", mock.Anything, s.manager.client.cfg.ClusterID, s.nodePool.id, id).Return(req). + On("K8sNodepoolsNodesDeleteExecute", req).Return(newAPIResponse(statusCode), reterr) } func TestIonosCloudManager(t *testing.T) { @@ -234,7 +267,7 @@ func TestIonosCloudManager(t *testing.T) { } func (s *ManagerTestSuite) TestGetNodeGroupSize_Error() { - s.OnListKubernetesNodes(nil, fmt.Errorf("error")).Once() + s.OnListKubernetesNodes(nil, errors.New("error")).Once() size, err := s.manager.GetNodeGroupSize(s.nodePool) s.Error(err) @@ -255,7 +288,7 @@ func (s *ManagerTestSuite) TestGetNodeGroupSize_OK() { } func (s *ManagerTestSuite) TestGetNodeGroupTargetSize_Error() { - s.OnGetKubernetesNodePool(nil, fmt.Errorf("error")).Once() + s.OnGetKubernetesNodePool(nil, errors.New("error")).Once() size, err := s.manager.GetNodeGroupTargetSize(s.nodePool) s.Error(err) @@ -263,7 +296,7 @@ func (s *ManagerTestSuite) TestGetNodeGroupTargetSize_Error() { } func (s *ManagerTestSuite) TestGetNodeGroupTargetSize_OK() { - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateActive, 2), nil).Once() + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Active, 2), nil).Once() size, err := s.manager.GetNodeGroupTargetSize(s.nodePool) s.NoError(err) @@ -272,7 +305,7 @@ func (s *ManagerTestSuite) TestGetNodeGroupTargetSize_OK() { func (s *ManagerTestSuite) TestSetNodeGroupSize_ResizeError() { s.manager.cache.SetNodeGroupSize(s.nodePool.Id(), 1) - s.OnUpdateKubernetesNodePool(2, fmt.Errorf("error")).Once() + s.OnUpdateKubernetesNodePool(2, errors.New("error")).Once() s.Error(s.manager.SetNodeGroupSize(s.nodePool, 2)) s.Empty(s.manager.cache.GetNodeGroups()) @@ -283,36 +316,36 @@ func (s *ManagerTestSuite) TestSetNodeGroupSize_ResizeError() { func (s *ManagerTestSuite) TestSetNodeGroupSize_WaitGetError() { s.OnUpdateKubernetesNodePool(2, nil).Once() - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateUpdating, 1), nil).Times(3) - s.OnGetKubernetesNodePool(nil, fmt.Errorf("error")).Once() + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Updating, 1), nil).Times(3) + s.OnGetKubernetesNodePool(nil, errors.New("error")).Once() err := s.manager.SetNodeGroupSize(s.nodePool, 2) s.Error(err) - s.False(errors.Is(err, wait.ErrWaitTimeout)) + s.False(wait.Interrupted(err)) s.Empty(s.manager.cache.GetNodeGroups()) } func (s *ManagerTestSuite) TestSetNodeGroupSize_WaitTimeout() { s.OnUpdateKubernetesNodePool(2, nil).Once() pollCount := 0 - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateUpdating, 1), nil). + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Updating, 1), nil). Run(func(_ mock.Arguments) { pollCount++ }) err := s.manager.SetNodeGroupSize(s.nodePool, 2) s.Error(err) - s.True(errors.Is(err, wait.ErrWaitTimeout)) + s.True(wait.Interrupted(err)) // The poll count may vary, so just do this to prevent flakes. - s.True(pollCount > int(pollTimeout/pollInterval)) + s.GreaterOrEqual(pollCount, int(pollTimeout/pollInterval)) s.Empty(s.manager.cache.GetNodeGroups()) } func (s *ManagerTestSuite) TestSetNodeGroupSize_RefreshNodesError() { s.OnUpdateKubernetesNodePool(2, nil).Once() - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateUpdating, 1), nil).Times(3) - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateActive, 2), nil).Once() - s.OnListKubernetesNodes(nil, fmt.Errorf("error")).Once() + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Updating, 1), nil).Times(3) + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Active, 2), nil).Once() + s.OnListKubernetesNodes(nil, errors.New("error")).Once() s.Error(s.manager.SetNodeGroupSize(s.nodePool, 2)) s.Empty(s.manager.cache.GetNodeGroups()) @@ -320,8 +353,8 @@ func (s *ManagerTestSuite) TestSetNodeGroupSize_RefreshNodesError() { func (s *ManagerTestSuite) TestSetNodeGroupSize_OK() { s.OnUpdateKubernetesNodePool(2, nil).Once() - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateUpdating, 1), nil).Times(3) - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateActive, 2), nil).Once() + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Updating, 1), nil).Times(3) + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Active, 2), nil).Once() s.OnListKubernetesNodes(&ionos.KubernetesNodes{ Items: &[]ionos.KubernetesNode{ newKubernetesNode("node-1", K8sNodeStateReady), @@ -338,7 +371,7 @@ func (s *ManagerTestSuite) TestSetNodeGroupSize_OK() { } func (s *ManagerTestSuite) TestGetInstancesForNodeGroup_Error() { - s.OnListKubernetesNodes(nil, fmt.Errorf("error")).Once() + s.OnListKubernetesNodes(nil, errors.New("error")).Once() instances, err := s.manager.GetInstancesForNodeGroup(s.nodePool) s.Error(err) @@ -377,7 +410,7 @@ func (s *ManagerTestSuite) TestGetNodeGroupForNode_NoMatchingNodePools() { func (s *ManagerTestSuite) TestGetNodeGroupForNode_OK() { s.manager.cache.nodesToNodeGroups["node-1"] = s.nodePool.Id() - s.manager.cache.nodeGroups[s.nodePool.Id()] = newCacheEntry(s.nodePool, time.Now()) + s.manager.cache.nodeGroups[s.nodePool.Id()] = s.nodePool nodePool := s.manager.GetNodeGroupForNode(newAPINode("node-1")) s.Equal(s.nodePool, nodePool) @@ -406,14 +439,14 @@ func (s *ManagerTestSuite) TestTryLockNodeGroup_LockUnlock() { } func (s *ManagerTestSuite) TestDeleteNode_GetSizeError() { - s.OnListKubernetesNodes(nil, fmt.Errorf("error")).Once() + s.OnListKubernetesNodes(nil, errors.New("error")).Once() s.Error(s.manager.DeleteNode(s.nodePool, "deleteme")) } func (s *ManagerTestSuite) TestDeleteNode_DeleteError() { s.manager.cache.SetNodeGroupSize(s.nodePool.Id(), 2) s.manager.cache.SetNodeGroupTargetSize(s.nodePool.Id(), 2) - s.OnDeleteKubernetesNode("notfound", fmt.Errorf("error")).Once() + s.OnDeleteKubernetesNode("notfound", errors.New("error")).Once() s.Error(s.manager.DeleteNode(s.nodePool, "notfound")) size, found := s.manager.cache.GetNodeGroupSize(s.nodePool.Id()) @@ -425,8 +458,8 @@ func (s *ManagerTestSuite) TestDeleteNode_WaitError() { s.manager.cache.SetNodeGroupSize(s.nodePool.Id(), 2) s.manager.cache.SetNodeGroupTargetSize(s.nodePool.Id(), 2) s.OnDeleteKubernetesNode("testnode", nil).Once() - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateUpdating, 1), nil).Twice() - s.OnGetKubernetesNodePool(nil, fmt.Errorf("error")).Once() + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Updating, 1), nil).Twice() + s.OnGetKubernetesNodePool(nil, errors.New("error")).Once() s.Error(s.manager.DeleteNode(s.nodePool, "testnode")) size, found := s.manager.cache.GetNodeGroupSize(s.nodePool.Id()) @@ -443,8 +476,8 @@ func (s *ManagerTestSuite) TestDeleteNode_OK() { newInstance("testnode"), newInstance("othernode"), }) s.OnDeleteKubernetesNode("testnode", nil).Once() - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateUpdating, 1), nil).Times(3) - s.OnGetKubernetesNodePool(newKubernetesNodePool(K8sStateActive, 1), nil).Once() + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Updating, 1), nil).Times(3) + s.OnGetKubernetesNodePool(newKubernetesNodePool(ionos.Active, 1), nil).Once() s.NoError(s.manager.DeleteNode(s.nodePool, "testnode")) size, found := s.manager.cache.GetNodeGroupSize(s.nodePool.Id()) @@ -472,27 +505,27 @@ func (s *ManagerTestSuite) TestInitExplicitNodeGroups_InvalidIDValue() { } func (s *ManagerTestSuite) TestInitExplicitNodeGroups_GetNodePoolError() { - id := NewUUID() + id := uuid.NewString() s.nodePool.id = id - s.OnGetKubernetesNodePool(nil, fmt.Errorf("error")).Once() + s.OnGetKubernetesNodePool(nil, errors.New("error")).Once() s.Error(s.manager.initExplicitNodeGroups([]string{"1:3:" + id})) } func (s *ManagerTestSuite) TestInitExplicitNodeGroups_ListNodesError() { - id := NewUUID() + id := uuid.NewString() s.nodePool.id = id - kNodePool := newKubernetesNodePool(K8sStateActive, 2) + kNodePool := newKubernetesNodePool(ionos.Active, 2) s.OnGetKubernetesNodePool(kNodePool, nil).Once() - s.OnListKubernetesNodes(nil, fmt.Errorf("error")).Once() + s.OnListKubernetesNodes(nil, errors.New("error")).Once() s.Error(s.manager.initExplicitNodeGroups([]string{"1:3:" + id})) } func (s *ManagerTestSuite) TestInitExplicitNodeGroups_OK() { - id := NewUUID() + id := uuid.NewString() s.nodePool.id = id - kNodePool := newKubernetesNodePool(K8sStateActive, 2) + kNodePool := newKubernetesNodePool(ionos.Active, 2) s.OnGetKubernetesNodePool(kNodePool, nil).Once() s.OnListKubernetesNodes(&ionos.KubernetesNodes{ Items: &[]ionos.KubernetesNode{ @@ -515,22 +548,3 @@ func (s *ManagerTestSuite) TestInitExplicitNodeGroups_OK() { s.True(found) s.Equal(2, size) } - -func (s *ManagerTestSuite) TestRefresh_Error() { - s.OnListKubernetesNodes(nil, fmt.Errorf("error")).Once() - - s.manager.cache.AddNodeGroup(&nodePool{id: "test", min: 1, max: 3}) - s.Error(s.manager.Refresh()) -} - -func (s *ManagerTestSuite) TestRefresh_OK() { - s.OnListKubernetesNodes(&ionos.KubernetesNodes{ - Items: &[]ionos.KubernetesNode{ - newKubernetesNode("1", K8sNodeStateReady), - newKubernetesNode("2", K8sNodeStateProvisioning), - }, - }, nil).Once() - - s.manager.cache.AddNodeGroup(&nodePool{id: "test", min: 1, max: 3}) - s.NoError(s.manager.Refresh()) -} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_metrics.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_metrics.go new file mode 100644 index 000000000000..9b8469fd4231 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_metrics.go @@ -0,0 +1,53 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package ionoscloud + +import ( + "strconv" + + ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" + k8smetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const ( + caNamespace = "cluster_autoscaler" +) + +var requestTotal = k8smetrics.NewCounterVec( + &k8smetrics.CounterOpts{ + Namespace: caNamespace, + Name: "ionoscloud_api_request_total", + Help: "Counter of IonosCloud API requests for each action and response status.", + }, []string{"action", "status"}, +) + +// RegisterMetrics registers all IonosCloud metrics. +func RegisterMetrics() { + legacyregistry.MustRegister(requestTotal) +} + +func registerRequest(action string, resp *ionos.APIResponse, err error) { + status := "success" + if err != nil { + status = "error" + if resp.Response != nil { + status = strconv.Itoa(resp.Response.StatusCode) + } + } + requestTotal.WithLabelValues(action, status).Inc() +} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/mock_api_client_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/mock_api_client_test.go index 15a9510261c1..36868c4c9df0 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/mock_api_client_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/mock_api_client_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery 2.12.1. DO NOT EDIT. +// Code generated by mockery v2.40.3. DO NOT EDIT. package ionoscloud @@ -23,8 +23,6 @@ import ( mock "github.com/stretchr/testify/mock" ionos_cloud_sdk_go "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" - - testing "testing" ) // MockAPIClient is an autogenerated mock type for the APIClient type @@ -36,6 +34,10 @@ type MockAPIClient struct { func (_m *MockAPIClient) K8sNodepoolsFindById(ctx context.Context, k8sClusterId string, nodepoolId string) ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest { ret := _m.Called(ctx, k8sClusterId, nodepoolId) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsFindById") + } + var r0 ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest if rf, ok := ret.Get(0).(func(context.Context, string, string) ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest); ok { r0 = rf(ctx, k8sClusterId, nodepoolId) @@ -50,14 +52,22 @@ func (_m *MockAPIClient) K8sNodepoolsFindById(ctx context.Context, k8sClusterId func (_m *MockAPIClient) K8sNodepoolsFindByIdExecute(r ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest) (ionos_cloud_sdk_go.KubernetesNodePool, *ionos_cloud_sdk_go.APIResponse, error) { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsFindByIdExecute") + } + var r0 ionos_cloud_sdk_go.KubernetesNodePool + var r1 *ionos_cloud_sdk_go.APIResponse + var r2 error + if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest) (ionos_cloud_sdk_go.KubernetesNodePool, *ionos_cloud_sdk_go.APIResponse, error)); ok { + return rf(r) + } if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest) ionos_cloud_sdk_go.KubernetesNodePool); ok { r0 = rf(r) } else { r0 = ret.Get(0).(ionos_cloud_sdk_go.KubernetesNodePool) } - var r1 *ionos_cloud_sdk_go.APIResponse if rf, ok := ret.Get(1).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest) *ionos_cloud_sdk_go.APIResponse); ok { r1 = rf(r) } else { @@ -66,7 +76,6 @@ func (_m *MockAPIClient) K8sNodepoolsFindByIdExecute(r ionos_cloud_sdk_go.ApiK8s } } - var r2 error if rf, ok := ret.Get(2).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsFindByIdRequest) error); ok { r2 = rf(r) } else { @@ -80,6 +89,10 @@ func (_m *MockAPIClient) K8sNodepoolsFindByIdExecute(r ionos_cloud_sdk_go.ApiK8s func (_m *MockAPIClient) K8sNodepoolsNodesDelete(ctx context.Context, k8sClusterId string, nodepoolId string, nodeId string) ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest { ret := _m.Called(ctx, k8sClusterId, nodepoolId, nodeId) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsNodesDelete") + } + var r0 ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest if rf, ok := ret.Get(0).(func(context.Context, string, string, string) ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest); ok { r0 = rf(ctx, k8sClusterId, nodepoolId, nodeId) @@ -94,7 +107,15 @@ func (_m *MockAPIClient) K8sNodepoolsNodesDelete(ctx context.Context, k8sCluster func (_m *MockAPIClient) K8sNodepoolsNodesDeleteExecute(r ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest) (*ionos_cloud_sdk_go.APIResponse, error) { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsNodesDeleteExecute") + } + var r0 *ionos_cloud_sdk_go.APIResponse + var r1 error + if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest) (*ionos_cloud_sdk_go.APIResponse, error)); ok { + return rf(r) + } if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest) *ionos_cloud_sdk_go.APIResponse); ok { r0 = rf(r) } else { @@ -103,7 +124,6 @@ func (_m *MockAPIClient) K8sNodepoolsNodesDeleteExecute(r ionos_cloud_sdk_go.Api } } - var r1 error if rf, ok := ret.Get(1).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesDeleteRequest) error); ok { r1 = rf(r) } else { @@ -117,6 +137,10 @@ func (_m *MockAPIClient) K8sNodepoolsNodesDeleteExecute(r ionos_cloud_sdk_go.Api func (_m *MockAPIClient) K8sNodepoolsNodesGet(ctx context.Context, k8sClusterId string, nodepoolId string) ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest { ret := _m.Called(ctx, k8sClusterId, nodepoolId) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsNodesGet") + } + var r0 ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest if rf, ok := ret.Get(0).(func(context.Context, string, string) ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest); ok { r0 = rf(ctx, k8sClusterId, nodepoolId) @@ -131,14 +155,22 @@ func (_m *MockAPIClient) K8sNodepoolsNodesGet(ctx context.Context, k8sClusterId func (_m *MockAPIClient) K8sNodepoolsNodesGetExecute(r ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest) (ionos_cloud_sdk_go.KubernetesNodes, *ionos_cloud_sdk_go.APIResponse, error) { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsNodesGetExecute") + } + var r0 ionos_cloud_sdk_go.KubernetesNodes + var r1 *ionos_cloud_sdk_go.APIResponse + var r2 error + if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest) (ionos_cloud_sdk_go.KubernetesNodes, *ionos_cloud_sdk_go.APIResponse, error)); ok { + return rf(r) + } if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest) ionos_cloud_sdk_go.KubernetesNodes); ok { r0 = rf(r) } else { r0 = ret.Get(0).(ionos_cloud_sdk_go.KubernetesNodes) } - var r1 *ionos_cloud_sdk_go.APIResponse if rf, ok := ret.Get(1).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest) *ionos_cloud_sdk_go.APIResponse); ok { r1 = rf(r) } else { @@ -147,7 +179,6 @@ func (_m *MockAPIClient) K8sNodepoolsNodesGetExecute(r ionos_cloud_sdk_go.ApiK8s } } - var r2 error if rf, ok := ret.Get(2).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsNodesGetRequest) error); ok { r2 = rf(r) } else { @@ -161,6 +192,10 @@ func (_m *MockAPIClient) K8sNodepoolsNodesGetExecute(r ionos_cloud_sdk_go.ApiK8s func (_m *MockAPIClient) K8sNodepoolsPut(ctx context.Context, k8sClusterId string, nodepoolId string) ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest { ret := _m.Called(ctx, k8sClusterId, nodepoolId) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsPut") + } + var r0 ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest if rf, ok := ret.Get(0).(func(context.Context, string, string) ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest); ok { r0 = rf(ctx, k8sClusterId, nodepoolId) @@ -175,14 +210,22 @@ func (_m *MockAPIClient) K8sNodepoolsPut(ctx context.Context, k8sClusterId strin func (_m *MockAPIClient) K8sNodepoolsPutExecute(r ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest) (ionos_cloud_sdk_go.KubernetesNodePool, *ionos_cloud_sdk_go.APIResponse, error) { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for K8sNodepoolsPutExecute") + } + var r0 ionos_cloud_sdk_go.KubernetesNodePool + var r1 *ionos_cloud_sdk_go.APIResponse + var r2 error + if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest) (ionos_cloud_sdk_go.KubernetesNodePool, *ionos_cloud_sdk_go.APIResponse, error)); ok { + return rf(r) + } if rf, ok := ret.Get(0).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest) ionos_cloud_sdk_go.KubernetesNodePool); ok { r0 = rf(r) } else { r0 = ret.Get(0).(ionos_cloud_sdk_go.KubernetesNodePool) } - var r1 *ionos_cloud_sdk_go.APIResponse if rf, ok := ret.Get(1).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest) *ionos_cloud_sdk_go.APIResponse); ok { r1 = rf(r) } else { @@ -191,7 +234,6 @@ func (_m *MockAPIClient) K8sNodepoolsPutExecute(r ionos_cloud_sdk_go.ApiK8sNodep } } - var r2 error if rf, ok := ret.Get(2).(func(ionos_cloud_sdk_go.ApiK8sNodepoolsPutRequest) error); ok { r2 = rf(r) } else { @@ -201,8 +243,12 @@ func (_m *MockAPIClient) K8sNodepoolsPutExecute(r ionos_cloud_sdk_go.ApiK8sNodep return r0, r1, r2 } -// NewMockAPIClient creates a new instance of MockAPIClient. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockAPIClient(t testing.TB) *MockAPIClient { +// NewMockAPIClient creates a new instance of MockAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockAPIClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockAPIClient { mock := &MockAPIClient{} mock.Mock.Test(t) diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/mock_ionos_cloud_manager_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/mock_ionos_cloud_manager_test.go index 95099fcaf349..10989de063e9 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/mock_ionos_cloud_manager_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/mock_ionos_cloud_manager_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by mockery 2.12.1. DO NOT EDIT. +// Code generated by mockery v2.40.3. DO NOT EDIT. package ionoscloud @@ -22,8 +22,6 @@ import ( mock "github.com/stretchr/testify/mock" cloudprovider "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" - testing "testing" - v1 "k8s.io/api/core/v1" ) @@ -36,6 +34,10 @@ type MockIonosCloudManager struct { func (_m *MockIonosCloudManager) DeleteNode(nodeGroup cloudprovider.NodeGroup, nodeId string) error { ret := _m.Called(nodeGroup, nodeId) + if len(ret) == 0 { + panic("no return value specified for DeleteNode") + } + var r0 error if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup, string) error); ok { r0 = rf(nodeGroup, nodeId) @@ -50,7 +52,15 @@ func (_m *MockIonosCloudManager) DeleteNode(nodeGroup cloudprovider.NodeGroup, n func (_m *MockIonosCloudManager) GetInstancesForNodeGroup(nodeGroup cloudprovider.NodeGroup) ([]cloudprovider.Instance, error) { ret := _m.Called(nodeGroup) + if len(ret) == 0 { + panic("no return value specified for GetInstancesForNodeGroup") + } + var r0 []cloudprovider.Instance + var r1 error + if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) ([]cloudprovider.Instance, error)); ok { + return rf(nodeGroup) + } if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) []cloudprovider.Instance); ok { r0 = rf(nodeGroup) } else { @@ -59,7 +69,6 @@ func (_m *MockIonosCloudManager) GetInstancesForNodeGroup(nodeGroup cloudprovide } } - var r1 error if rf, ok := ret.Get(1).(func(cloudprovider.NodeGroup) error); ok { r1 = rf(nodeGroup) } else { @@ -73,6 +82,10 @@ func (_m *MockIonosCloudManager) GetInstancesForNodeGroup(nodeGroup cloudprovide func (_m *MockIonosCloudManager) GetNodeGroupForNode(node *v1.Node) cloudprovider.NodeGroup { ret := _m.Called(node) + if len(ret) == 0 { + panic("no return value specified for GetNodeGroupForNode") + } + var r0 cloudprovider.NodeGroup if rf, ok := ret.Get(0).(func(*v1.Node) cloudprovider.NodeGroup); ok { r0 = rf(node) @@ -89,14 +102,21 @@ func (_m *MockIonosCloudManager) GetNodeGroupForNode(node *v1.Node) cloudprovide func (_m *MockIonosCloudManager) GetNodeGroupSize(nodeGroup cloudprovider.NodeGroup) (int, error) { ret := _m.Called(nodeGroup) + if len(ret) == 0 { + panic("no return value specified for GetNodeGroupSize") + } + var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) (int, error)); ok { + return rf(nodeGroup) + } if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) int); ok { r0 = rf(nodeGroup) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(cloudprovider.NodeGroup) error); ok { r1 = rf(nodeGroup) } else { @@ -110,14 +130,21 @@ func (_m *MockIonosCloudManager) GetNodeGroupSize(nodeGroup cloudprovider.NodeGr func (_m *MockIonosCloudManager) GetNodeGroupTargetSize(nodeGroup cloudprovider.NodeGroup) (int, error) { ret := _m.Called(nodeGroup) + if len(ret) == 0 { + panic("no return value specified for GetNodeGroupTargetSize") + } + var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) (int, error)); ok { + return rf(nodeGroup) + } if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) int); ok { r0 = rf(nodeGroup) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(cloudprovider.NodeGroup) error); ok { r1 = rf(nodeGroup) } else { @@ -131,6 +158,10 @@ func (_m *MockIonosCloudManager) GetNodeGroupTargetSize(nodeGroup cloudprovider. func (_m *MockIonosCloudManager) GetNodeGroups() []cloudprovider.NodeGroup { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNodeGroups") + } + var r0 []cloudprovider.NodeGroup if rf, ok := ret.Get(0).(func() []cloudprovider.NodeGroup); ok { r0 = rf() @@ -147,6 +178,10 @@ func (_m *MockIonosCloudManager) GetNodeGroups() []cloudprovider.NodeGroup { func (_m *MockIonosCloudManager) SetNodeGroupSize(nodeGroup cloudprovider.NodeGroup, size int) error { ret := _m.Called(nodeGroup, size) + if len(ret) == 0 { + panic("no return value specified for SetNodeGroupSize") + } + var r0 error if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup, int) error); ok { r0 = rf(nodeGroup, size) @@ -161,6 +196,10 @@ func (_m *MockIonosCloudManager) SetNodeGroupSize(nodeGroup cloudprovider.NodeGr func (_m *MockIonosCloudManager) TryLockNodeGroup(nodeGroup cloudprovider.NodeGroup) bool { ret := _m.Called(nodeGroup) + if len(ret) == 0 { + panic("no return value specified for TryLockNodeGroup") + } + var r0 bool if rf, ok := ret.Get(0).(func(cloudprovider.NodeGroup) bool); ok { r0 = rf(nodeGroup) @@ -176,8 +215,12 @@ func (_m *MockIonosCloudManager) UnlockNodeGroup(nodeGroup cloudprovider.NodeGro _m.Called(nodeGroup) } -// NewMockIonosCloudManager creates a new instance of MockIonosCloudManager. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockIonosCloudManager(t testing.TB) *MockIonosCloudManager { +// NewMockIonosCloudManager creates a new instance of MockIonosCloudManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockIonosCloudManager(t interface { + mock.TestingT + Cleanup(func()) +}) *MockIonosCloudManager { mock := &MockIonosCloudManager{} mock.Mock.Test(t) diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/utils.go b/cluster-autoscaler/cloudprovider/ionoscloud/utils.go index a153745a3274..84f8a9e0a778 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/utils.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/utils.go @@ -17,31 +17,31 @@ limitations under the License. package ionoscloud import ( + "errors" "fmt" "strings" - "github.com/google/uuid" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" ) const ( - // ProviderIdPrefix is the prefix of the provider id of a Kubernetes node object. - ProviderIdPrefix = "ionos://" + // ProviderIDPrefix is the prefix of the provider id of a Kubernetes node object. + ProviderIDPrefix = "ionos://" // ErrorCodeUnknownState is set if the IonosCloud Kubernetes instace has an unknown state. ErrorCodeUnknownState = "UNKNOWN_STATE" ) -var errMissingNodeID = fmt.Errorf("missing node ID") +var errMissingNodeID = errors.New("missing node ID") -// convertToInstanceId converts an IonosCloud kubernetes node Id to a cloudprovider.Instance Id. -func convertToInstanceId(nodeId string) string { - return fmt.Sprintf("%s%s", ProviderIdPrefix, nodeId) +// convertToInstanceID converts an IonosCloud kubernetes node Id to a cloudprovider.Instance Id. +func convertToInstanceID(nodeID string) string { + return fmt.Sprintf("%s%s", ProviderIDPrefix, nodeID) } -// convertToNodeId converts a cloudprovider.Instance Id to an IonosCloud kubernetes node Id. -func convertToNodeId(providerId string) string { - return strings.TrimPrefix(providerId, ProviderIdPrefix) +// convertToNodeID converts a cloudprovider.Instance Id to an IonosCloud kubernetes node Id. +func convertToNodeID(providerID string) string { + return strings.TrimPrefix(providerID, ProviderIDPrefix) } // convertToInstances converts a list IonosCloud kubernetes nodes to a list of cloudprovider.Instances. @@ -63,7 +63,7 @@ func convertToInstance(node ionos.KubernetesNode) (cloudprovider.Instance, error return cloudprovider.Instance{}, errMissingNodeID } return cloudprovider.Instance{ - Id: convertToInstanceId(*node.Id), + Id: convertToInstanceID(*node.Id), Status: convertToInstanceStatus(*node.Metadata.State), }, nil } @@ -82,13 +82,8 @@ func convertToInstanceStatus(nodeState string) *cloudprovider.InstanceStatus { st.ErrorInfo = &cloudprovider.InstanceErrorInfo{ ErrorClass: cloudprovider.OtherErrorClass, ErrorCode: ErrorCodeUnknownState, - ErrorMessage: fmt.Sprintf("Unknown node state: %s", nodeState), + ErrorMessage: "Unknown node state: " + nodeState, } } return st } - -// NewUUID returns a new UUID as string. -func NewUUID() string { - return uuid.New().String() -} diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go index 150483eac911..1af4801b2095 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go @@ -22,54 +22,54 @@ import ( "github.com/stretchr/testify/require" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ) var ( kubernetesNodes = []ionos.KubernetesNode{ { - Id: pointer.StringPtr("1"), + Id: ptr.To("1"), Metadata: &ionos.KubernetesNodeMetadata{ - State: pointer.StringPtr(K8sNodeStateProvisioning), + State: ptr.To(K8sNodeStateProvisioning), }, Properties: &ionos.KubernetesNodeProperties{ - Name: pointer.StringPtr("node1"), + Name: ptr.To("node1"), }, }, { - Id: pointer.StringPtr("2"), + Id: ptr.To("2"), Metadata: &ionos.KubernetesNodeMetadata{ - State: pointer.StringPtr(K8sNodeStateProvisioned), + State: ptr.To(K8sNodeStateProvisioned), }, Properties: &ionos.KubernetesNodeProperties{ - Name: pointer.StringPtr("node2"), + Name: ptr.To("node2"), }, }, { - Id: pointer.StringPtr("3"), + Id: ptr.To("3"), Metadata: &ionos.KubernetesNodeMetadata{ - State: pointer.StringPtr(K8sNodeStateRebuilding), + State: ptr.To(K8sNodeStateRebuilding), }, Properties: &ionos.KubernetesNodeProperties{ - Name: pointer.StringPtr("node3"), + Name: ptr.To("node3"), }, }, { - Id: pointer.StringPtr("4"), + Id: ptr.To("4"), Metadata: &ionos.KubernetesNodeMetadata{ - State: pointer.StringPtr(K8sNodeStateTerminating), + State: ptr.To(K8sNodeStateTerminating), }, Properties: &ionos.KubernetesNodeProperties{ - Name: pointer.StringPtr("node4"), + Name: ptr.To("node4"), }, }, { - Id: pointer.StringPtr("5"), + Id: ptr.To("5"), Metadata: &ionos.KubernetesNodeMetadata{ - State: pointer.StringPtr(K8sNodeStateReady), + State: ptr.To(K8sNodeStateReady), }, Properties: &ionos.KubernetesNodeProperties{ - Name: pointer.StringPtr("node5"), + Name: ptr.To("node5"), }, }, } @@ -107,7 +107,7 @@ func TestUtils_ConvertToInstanceId(t *testing.T) { t.Run("Success", func(t *testing.T) { in := "1-2-3-4" want := "ionos://1-2-3-4" - got := convertToInstanceId(in) + got := convertToInstanceID(in) require.Equal(t, want, got) }) } @@ -116,7 +116,7 @@ func TestUtils_ConvertToNodeId(t *testing.T) { t.Run("Success", func(t *testing.T) { in := "ionos://1-2-3-4" want := "1-2-3-4" - got := convertToNodeId(in) + got := convertToNodeID(in) require.Equal(t, want, got) }) } @@ -138,9 +138,9 @@ func TestUtils_ConvertToInstances(t *testing.T) { func TestUtils_ConvertToInstance(t *testing.T) { t.Run("Success", func(t *testing.T) { in := ionos.KubernetesNode{ - Id: pointer.StringPtr("1"), + Id: ptr.To("1"), Metadata: &ionos.KubernetesNodeMetadata{ - State: pointer.StringPtr(K8sNodeStateReady), + State: ptr.To(K8sNodeStateReady), }, } want := cloudprovider.Instance{ diff --git a/hack/verify-spelling.sh b/hack/verify-spelling.sh index a9dd938e0a70..001a056c5141 100755 --- a/hack/verify-spelling.sh +++ b/hack/verify-spelling.sh @@ -20,4 +20,4 @@ set -o pipefail DIR=$(dirname $0) # Spell checking -git ls-files --full-name | grep -v -e vendor | grep -v cluster-autoscaler/cloudprovider/magnum/gophercloud| grep -v cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3 | grep -v cluster-autoscaler/cloudprovider/digitalocean/godo | grep -v cluster-autoscaler/cloudprovider/hetzner/hcloud-go | grep -v cluster-autoscaler/cloudprovider/bizflycloud/gobizfly | grep -v cluster-autoscaler/cloudprovider/oci/oci-go-sdk | grep -E -v 'cluster-autoscaler/cloudprovider/brightbox/(go-cache|gobrightbox|k8ssdk|linkheader)' | grep -v cluster-autoscaler/cloudprovider/aws/aws-sdk-go | xargs misspell -error -o stderr +git ls-files --full-name | grep -v -e vendor | grep -v cluster-autoscaler/cloudprovider/magnum/gophercloud| grep -v cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3 | grep -v cluster-autoscaler/cloudprovider/digitalocean/godo | grep -v cluster-autoscaler/cloudprovider/hetzner/hcloud-go | grep -v cluster-autoscaler/cloudprovider/bizflycloud/gobizfly | grep -v cluster-autoscaler/cloudprovider/oci/oci-go-sdk | grep -E -v 'cluster-autoscaler/cloudprovider/brightbox/(go-cache|gobrightbox|k8ssdk|linkheader)' | grep -v cluster-autoscaler/cloudprovider/aws/aws-sdk-go | grep -v cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go | xargs misspell -error -o stderr From 42b8df2a447c2fb8fa69beb2558f7a8aab733330 Mon Sep 17 00:00:00 2001 From: Mario Valderrama Date: Wed, 13 Mar 2024 17:41:17 +0100 Subject: [PATCH 2/3] Add workaround for missing maps package --- cluster-autoscaler/cloudprovider/ionoscloud/cache.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/cache.go b/cluster-autoscaler/cloudprovider/ionoscloud/cache.go index 0106422569e9..6213c288ed4d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/cache.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/cache.go @@ -17,7 +17,6 @@ limitations under the License. package ionoscloud import ( - "maps" "sync" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" @@ -73,12 +72,21 @@ func (cache *IonosCache) SetInstancesCacheForNodeGroup(id string, instances []cl cache.mutex.Lock() defer cache.mutex.Unlock() - maps.DeleteFunc(cache.nodesToNodeGroups, func(_, nodeGroupID string) bool { + mapsDeleteFunc(cache.nodesToNodeGroups, func(_, nodeGroupID string) bool { return nodeGroupID == id }) cache.setInstancesCacheForNodeGroupNoLock(id, instances) } +// placeholder for maps.DeleteFunc in go 1.21 +func mapsDeleteFunc(m map[string]string, del func(k, v string) bool) { + for k, v := range m { + if del(k, v) { + delete(m, k) + } + } +} + func (cache *IonosCache) setInstancesCacheForNodeGroupNoLock(id string, instances []cloudprovider.Instance) { for _, instance := range instances { nodeID := convertToNodeID(instance.Id) From 34108be9e6f2aec23ee78331efeb28bc7f09fc67 Mon Sep 17 00:00:00 2001 From: Mario Valderrama Date: Wed, 13 Mar 2024 18:13:35 +0100 Subject: [PATCH 3/3] Fix missing ptr package import --- .../ionoscloud/ionoscloud_manager_test.go | 11 +++--- .../cloudprovider/ionoscloud/utils_test.go | 39 ++++++++++--------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go index 64be7319d4c6..d0891d72a055 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_manager_test.go @@ -31,7 +31,6 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" - "k8s.io/utils/ptr" ) var ( @@ -137,16 +136,16 @@ func TestCreateIonosCloudManager(t *testing.T) { func newKubernetesNodePool(state string, size int32) *ionos.KubernetesNodePool { return &ionos.KubernetesNodePool{ - Id: ptr.To("test"), - Metadata: &ionos.DatacenterElementMetadata{State: ptr.To(state)}, - Properties: &ionos.KubernetesNodePoolProperties{NodeCount: ptr.To(size)}, + Id: ptrTo("test"), + Metadata: &ionos.DatacenterElementMetadata{State: ptrTo(state)}, + Properties: &ionos.KubernetesNodePoolProperties{NodeCount: ptrTo(size)}, } } func newKubernetesNode(id, state string) ionos.KubernetesNode { return ionos.KubernetesNode{ - Id: ptr.To(id), - Metadata: &ionos.KubernetesNodeMetadata{State: ptr.To(state)}, + Id: ptrTo(id), + Metadata: &ionos.KubernetesNodeMetadata{State: ptrTo(state)}, } } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go index 1af4801b2095..f040418abdb9 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/utils_test.go @@ -22,54 +22,57 @@ import ( "github.com/stretchr/testify/require" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider" ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" - "k8s.io/utils/ptr" ) +func ptrTo[T any](v T) *T { + return &v +} + var ( kubernetesNodes = []ionos.KubernetesNode{ { - Id: ptr.To("1"), + Id: ptrTo("1"), Metadata: &ionos.KubernetesNodeMetadata{ - State: ptr.To(K8sNodeStateProvisioning), + State: ptrTo(K8sNodeStateProvisioning), }, Properties: &ionos.KubernetesNodeProperties{ - Name: ptr.To("node1"), + Name: ptrTo("node1"), }, }, { - Id: ptr.To("2"), + Id: ptrTo("2"), Metadata: &ionos.KubernetesNodeMetadata{ - State: ptr.To(K8sNodeStateProvisioned), + State: ptrTo(K8sNodeStateProvisioned), }, Properties: &ionos.KubernetesNodeProperties{ - Name: ptr.To("node2"), + Name: ptrTo("node2"), }, }, { - Id: ptr.To("3"), + Id: ptrTo("3"), Metadata: &ionos.KubernetesNodeMetadata{ - State: ptr.To(K8sNodeStateRebuilding), + State: ptrTo(K8sNodeStateRebuilding), }, Properties: &ionos.KubernetesNodeProperties{ - Name: ptr.To("node3"), + Name: ptrTo("node3"), }, }, { - Id: ptr.To("4"), + Id: ptrTo("4"), Metadata: &ionos.KubernetesNodeMetadata{ - State: ptr.To(K8sNodeStateTerminating), + State: ptrTo(K8sNodeStateTerminating), }, Properties: &ionos.KubernetesNodeProperties{ - Name: ptr.To("node4"), + Name: ptrTo("node4"), }, }, { - Id: ptr.To("5"), + Id: ptrTo("5"), Metadata: &ionos.KubernetesNodeMetadata{ - State: ptr.To(K8sNodeStateReady), + State: ptrTo(K8sNodeStateReady), }, Properties: &ionos.KubernetesNodeProperties{ - Name: ptr.To("node5"), + Name: ptrTo("node5"), }, }, } @@ -138,9 +141,9 @@ func TestUtils_ConvertToInstances(t *testing.T) { func TestUtils_ConvertToInstance(t *testing.T) { t.Run("Success", func(t *testing.T) { in := ionos.KubernetesNode{ - Id: ptr.To("1"), + Id: ptrTo("1"), Metadata: &ionos.KubernetesNodeMetadata{ - State: ptr.To(K8sNodeStateReady), + State: ptrTo(K8sNodeStateReady), }, } want := cloudprovider.Instance{