From 4b490800d7a349eea4f5054fe3f5a9bd1f7a173d Mon Sep 17 00:00:00 2001 From: Radu Mocanu Date: Fri, 1 Mar 2024 16:04:52 +0200 Subject: [PATCH] chore: updated dependecies --- go.mod | 28 +- go.sum | 83 +- internal/utils/nat.go | 11 +- .../github.com/Azure/go-ansiterm/SECURITY.md | 41 + .../ionos-cloud/sdk-go/v6/README.md | 215 +- .../github.com/ionos-cloud/sdk-go/v6/api_.go | 10 +- .../v6/api_application_load_balancers.go | 124 +- .../ionos-cloud/sdk-go/v6/api_backup_units.go | 20 +- .../sdk-go/v6/api_contract_resources.go | 10 +- .../ionos-cloud/sdk-go/v6/api_data_centers.go | 28 +- .../sdk-go/v6/api_firewall_rules.go | 24 +- .../ionos-cloud/sdk-go/v6/api_flow_logs.go | 20 +- .../ionos-cloud/sdk-go/v6/api_images.go | 18 +- .../ionos-cloud/sdk-go/v6/api_ip_blocks.go | 24 +- .../ionos-cloud/sdk-go/v6/api_kubernetes.go | 120 +- .../ionos-cloud/sdk-go/v6/api_labels.go | 104 +- .../ionos-cloud/sdk-go/v6/api_lans.go | 26 +- .../sdk-go/v6/api_load_balancers.go | 36 +- .../ionos-cloud/sdk-go/v6/api_locations.go | 36 +- .../ionos-cloud/sdk-go/v6/api_nat_gateways.go | 62 +- .../sdk-go/v6/api_network_interfaces.go | 20 +- .../sdk-go/v6/api_network_load_balancers.go | 56 +- .../sdk-go/v6/api_private_cross_connects.go | 18 +- .../ionos-cloud/sdk-go/v6/api_requests.go | 12 +- .../ionos-cloud/sdk-go/v6/api_servers.go | 214 +- .../ionos-cloud/sdk-go/v6/api_snapshots.go | 18 +- .../sdk-go/v6/api_target_groups.go | 48 +- .../ionos-cloud/sdk-go/v6/api_templates.go | 34 +- .../sdk-go/v6/api_user_management.go | 70 +- .../ionos-cloud/sdk-go/v6/api_user_s3_keys.go | 22 +- .../ionos-cloud/sdk-go/v6/api_volumes.go | 28 +- .../ionos-cloud/sdk-go/v6/client.go | 45 +- .../ionos-cloud/sdk-go/v6/configuration.go | 25 +- .../v6/model_application_load_balancer.go | 140 +- ...odel_application_load_balancer_entities.go | 3 +- ...plication_load_balancer_forwarding_rule.go | 157 +- ...oad_balancer_forwarding_rule_properties.go | 183 +- ...ation_load_balancer_forwarding_rule_put.go | 128 +- ...lication_load_balancer_forwarding_rules.go | 199 +- ...del_application_load_balancer_http_rule.go | 277 +- ...ation_load_balancer_http_rule_condition.go | 115 +- ...el_application_load_balancer_properties.go | 165 +- .../v6/model_application_load_balancer_put.go | 128 +- .../v6/model_application_load_balancers.go | 199 +- .../sdk-go/v6/model_attached_volumes.go | 199 +- .../sdk-go/v6/model_backup_unit.go | 157 +- .../sdk-go/v6/model_backup_unit_properties.go | 91 +- .../sdk-go/v6/model_backup_unit_sso.go | 3 +- .../sdk-go/v6/model_backup_units.go | 128 +- .../sdk-go/v6/model_balanced_nics.go | 199 +- .../ionos-cloud/sdk-go/v6/model_cdroms.go | 199 +- .../sdk-go/v6/model_connectable_datacenter.go | 65 +- .../ionos-cloud/sdk-go/v6/model_contract.go | 64 +- .../sdk-go/v6/model_contract_properties.go | 99 +- .../ionos-cloud/sdk-go/v6/model_contracts.go | 128 +- .../v6/model_cpu_architecture_properties.go | 12 +- .../sdk-go/v6/model_data_center_entities.go | 188 +- .../ionos-cloud/sdk-go/v6/model_datacenter.go | 140 +- .../v6/model_datacenter_element_metadata.go | 244 +- .../sdk-go/v6/model_datacenter_properties.go | 226 +- .../sdk-go/v6/model_datacenters.go | 199 +- .../ionos-cloud/sdk-go/v6/model_error.go | 6 +- .../sdk-go/v6/model_error_message.go | 6 +- .../sdk-go/v6/model_firewall_rule.go | 157 +- .../sdk-go/v6/model_firewall_rules.go | 199 +- .../v6/model_firewallrule_properties.go | 387 ++- .../ionos-cloud/sdk-go/v6/model_flow_log.go | 157 +- .../sdk-go/v6/model_flow_log_properties.go | 108 +- .../sdk-go/v6/model_flow_log_put.go | 128 +- .../ionos-cloud/sdk-go/v6/model_flow_logs.go | 199 +- .../ionos-cloud/sdk-go/v6/model_group.go | 135 +- .../sdk-go/v6/model_group_entities.go | 62 +- .../sdk-go/v6/model_group_members.go | 128 +- .../sdk-go/v6/model_group_properties.go | 588 ++-- .../sdk-go/v6/model_group_share.go | 128 +- .../sdk-go/v6/model_group_share_properties.go | 6 +- .../sdk-go/v6/model_group_shares.go | 128 +- .../sdk-go/v6/model_group_users.go | 128 +- .../ionos-cloud/sdk-go/v6/model_groups.go | 128 +- .../ionos-cloud/sdk-go/v6/model_image.go | 157 +- .../sdk-go/v6/model_image_properties.go | 627 ++-- .../ionos-cloud/sdk-go/v6/model_images.go | 128 +- .../ionos-cloud/sdk-go/v6/model_info.go | 15 +- .../ionos-cloud/sdk-go/v6/model_ip_block.go | 157 +- .../sdk-go/v6/model_ip_block_properties.go | 129 +- .../ionos-cloud/sdk-go/v6/model_ip_blocks.go | 199 +- .../sdk-go/v6/model_ip_consumer.go | 275 +- .../sdk-go/v6/model_ip_failover.go | 6 +- .../v6/model_kubernetes_auto_scaling.go | 70 +- .../sdk-go/v6/model_kubernetes_cluster.go | 142 +- .../v6/model_kubernetes_cluster_entities.go | 3 +- .../v6/model_kubernetes_cluster_for_post.go | 142 +- .../v6/model_kubernetes_cluster_for_put.go | 140 +- .../v6/model_kubernetes_cluster_properties.go | 331 +- ..._kubernetes_cluster_properties_for_post.go | 263 +- ...l_kubernetes_cluster_properties_for_put.go | 83 +- .../sdk-go/v6/model_kubernetes_clusters.go | 132 +- .../v6/model_kubernetes_maintenance_window.go | 10 +- .../sdk-go/v6/model_kubernetes_node.go | 157 +- .../v6/model_kubernetes_node_metadata.go | 165 +- .../sdk-go/v6/model_kubernetes_node_pool.go | 157 +- .../v6/model_kubernetes_node_pool_for_post.go | 157 +- .../v6/model_kubernetes_node_pool_for_put.go | 157 +- .../v6/model_kubernetes_node_pool_lan.go | 89 +- .../model_kubernetes_node_pool_lan_routes.go | 64 +- .../model_kubernetes_node_pool_properties.go | 535 ++-- ...ubernetes_node_pool_properties_for_post.go | 550 ++-- ...kubernetes_node_pool_properties_for_put.go | 245 +- .../sdk-go/v6/model_kubernetes_node_pools.go | 128 +- .../v6/model_kubernetes_node_properties.go | 110 +- .../sdk-go/v6/model_kubernetes_nodes.go | 128 +- .../ionos-cloud/sdk-go/v6/model_label.go | 157 +- .../sdk-go/v6/model_label_properties.go | 79 +- .../sdk-go/v6/model_label_resource.go | 157 +- .../v6/model_label_resource_properties.go | 6 +- .../sdk-go/v6/model_label_resources.go | 199 +- .../ionos-cloud/sdk-go/v6/model_labels.go | 128 +- .../ionos-cloud/sdk-go/v6/model_lan.go | 140 +- .../sdk-go/v6/model_lan_entities.go | 3 +- .../ionos-cloud/sdk-go/v6/model_lan_nics.go | 199 +- .../ionos-cloud/sdk-go/v6/model_lan_post.go | 166 +- .../sdk-go/v6/model_lan_properties.go | 121 +- .../sdk-go/v6/model_lan_properties_post.go | 121 +- .../ionos-cloud/sdk-go/v6/model_lans.go | 199 +- .../sdk-go/v6/model_loadbalancer.go | 140 +- .../sdk-go/v6/model_loadbalancer_entities.go | 3 +- .../v6/model_loadbalancer_properties.go | 82 +- .../sdk-go/v6/model_loadbalancers.go | 199 +- .../ionos-cloud/sdk-go/v6/model_location.go | 157 +- .../sdk-go/v6/model_location_properties.go | 80 +- .../ionos-cloud/sdk-go/v6/model_locations.go | 128 +- .../sdk-go/v6/model_nat_gateway.go | 140 +- .../sdk-go/v6/model_nat_gateway_entities.go | 62 +- .../v6/model_nat_gateway_lan_properties.go | 64 +- .../sdk-go/v6/model_nat_gateway_properties.go | 91 +- .../sdk-go/v6/model_nat_gateway_put.go | 128 +- .../sdk-go/v6/model_nat_gateway_rule.go | 157 +- .../v6/model_nat_gateway_rule_properties.go | 147 +- .../sdk-go/v6/model_nat_gateway_rule_put.go | 128 +- .../sdk-go/v6/model_nat_gateway_rules.go | 128 +- .../sdk-go/v6/model_nat_gateways.go | 199 +- .../sdk-go/v6/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 +- .../v6/model_network_load_balancer_put.go | 128 +- .../sdk-go/v6/model_network_load_balancers.go | 199 +- .../ionos-cloud/sdk-go/v6/model_nic.go | 140 +- .../sdk-go/v6/model_nic_entities.go | 62 +- .../sdk-go/v6/model_nic_properties.go | 433 ++- .../ionos-cloud/sdk-go/v6/model_nic_put.go | 128 +- .../ionos-cloud/sdk-go/v6/model_nics.go | 199 +- .../sdk-go/v6/model_no_state_meta_data.go | 239 +- .../sdk-go/v6/model_pagination_links.go | 91 +- .../ionos-cloud/sdk-go/v6/model_peer.go | 151 +- .../sdk-go/v6/model_private_cross_connect.go | 157 +- .../model_private_cross_connect_properties.go | 102 +- .../sdk-go/v6/model_private_cross_connects.go | 128 +- .../sdk-go/v6/model_remote_console_url.go | 3 +- .../ionos-cloud/sdk-go/v6/model_request.go | 157 +- .../sdk-go/v6/model_request_metadata.go | 84 +- .../sdk-go/v6/model_request_properties.go | 72 +- .../sdk-go/v6/model_request_status.go | 128 +- .../v6/model_request_status_metadata.go | 72 +- .../sdk-go/v6/model_request_target.go | 62 +- .../ionos-cloud/sdk-go/v6/model_requests.go | 205 +- .../ionos-cloud/sdk-go/v6/model_resource.go | 140 +- .../sdk-go/v6/model_resource_entities.go | 3 +- .../sdk-go/v6/model_resource_groups.go | 128 +- .../sdk-go/v6/model_resource_limits.go | 748 ++--- .../sdk-go/v6/model_resource_properties.go | 6 +- .../sdk-go/v6/model_resource_reference.go | 91 +- .../ionos-cloud/sdk-go/v6/model_resources.go | 128 +- .../sdk-go/v6/model_resources_users.go | 128 +- .../ionos-cloud/sdk-go/v6/model_s3_bucket.go | 5 +- .../ionos-cloud/sdk-go/v6/model_s3_key.go | 157 +- .../sdk-go/v6/model_s3_key_metadata.go | 78 +- .../sdk-go/v6/model_s3_key_properties.go | 64 +- .../ionos-cloud/sdk-go/v6/model_s3_keys.go | 128 +- .../sdk-go/v6/model_s3_object_storage_sso.go | 3 +- .../ionos-cloud/sdk-go/v6/model_server.go | 140 +- .../sdk-go/v6/model_server_entities.go | 65 +- .../sdk-go/v6/model_server_properties.go | 353 ++- .../ionos-cloud/sdk-go/v6/model_servers.go | 199 +- .../ionos-cloud/sdk-go/v6/model_snapshot.go | 157 +- .../sdk-go/v6/model_snapshot_properties.go | 504 +-- .../ionos-cloud/sdk-go/v6/model_snapshots.go | 128 +- .../sdk-go/v6/model_target_group.go | 157 +- .../v6/model_target_group_health_check.go | 71 +- .../model_target_group_http_health_check.go | 150 +- .../v6/model_target_group_properties.go | 198 +- .../sdk-go/v6/model_target_group_put.go | 128 +- .../sdk-go/v6/model_target_group_target.go | 181 +- .../sdk-go/v6/model_target_groups.go | 199 +- .../sdk-go/v6/model_target_port_range.go | 64 +- .../ionos-cloud/sdk-go/v6/model_template.go | 157 +- .../sdk-go/v6/model_template_properties.go | 74 +- .../ionos-cloud/sdk-go/v6/model_templates.go | 128 +- .../ionos-cloud/sdk-go/v6/model_token.go | 3 +- .../ionos-cloud/sdk-go/v6/model_user.go | 140 +- .../sdk-go/v6/model_user_metadata.go | 81 +- .../ionos-cloud/sdk-go/v6/model_user_post.go | 3 +- .../sdk-go/v6/model_user_properties.go | 184 +- .../sdk-go/v6/model_user_properties_post.go | 184 +- .../sdk-go/v6/model_user_properties_put.go | 232 +- .../ionos-cloud/sdk-go/v6/model_user_put.go | 6 +- .../ionos-cloud/sdk-go/v6/model_users.go | 199 +- .../sdk-go/v6/model_users_entities.go | 62 +- .../ionos-cloud/sdk-go/v6/model_volume.go | 157 +- .../sdk-go/v6/model_volume_properties.go | 737 ++--- .../ionos-cloud/sdk-go/v6/model_volumes.go | 199 +- .../github.com/ionos-cloud/sdk-go/v6/utils.go | 46 + vendor/github.com/moby/term/doc.go | 3 + vendor/github.com/moby/term/tc.go | 20 - vendor/github.com/moby/term/term.go | 116 +- vendor/github.com/moby/term/term_unix.go | 98 + vendor/github.com/moby/term/term_windows.go | 99 +- .../moby/term/{termios.go => termios_unix.go} | 13 +- .../github.com/moby/term/termios_windows.go | 37 + .../moby/term/windows/ansi_reader.go | 4 +- .../github.com/moby/term/windows/console.go | 7 +- vendor/github.com/moby/term/winsize.go | 21 - .../testify/assert/assertion_compare.go | 64 +- .../assert/assertion_compare_can_convert.go | 16 - .../assert/assertion_compare_legacy.go | 16 - .../testify/assert/assertion_format.go | 244 +- .../testify/assert/assertion_forward.go | 483 +-- .../testify/assert/assertion_order.go | 24 +- .../stretchr/testify/assert/assertions.go | 541 +++- .../github.com/stretchr/testify/assert/doc.go | 43 +- .../testify/assert/http_assertions.go | 39 +- vendor/github.com/tidwall/gjson/README.md | 11 +- vendor/github.com/tidwall/gjson/SYNTAX.md | 24 +- vendor/github.com/tidwall/gjson/gjson.go | 315 +- vendor/github.com/tidwall/pretty/README.md | 2 +- vendor/github.com/tidwall/pretty/pretty.go | 22 +- .../x/crypto/chacha20/chacha_arm64.go | 1 - .../x/crypto/chacha20/chacha_arm64.s | 1 - .../x/crypto/chacha20/chacha_noasm.go | 1 - .../x/crypto/chacha20/chacha_ppc64le.go | 1 - .../x/crypto/chacha20/chacha_ppc64le.s | 1 - .../x/crypto/chacha20/chacha_s390x.go | 1 - .../x/crypto/chacha20/chacha_s390x.s | 1 - .../curve25519/internal/field/fe_amd64.go | 1 - .../curve25519/internal/field/fe_amd64.s | 1 - .../internal/field/fe_amd64_noasm.go | 1 - .../curve25519/internal/field/fe_arm64.go | 1 - .../curve25519/internal/field/fe_arm64.s | 1 - .../internal/field/fe_arm64_noasm.go | 1 - .../x/crypto/internal/alias/alias.go | 1 - .../x/crypto/internal/alias/alias_purego.go | 1 - .../x/crypto/internal/poly1305/bits_compat.go | 40 - .../x/crypto/internal/poly1305/bits_go1.13.go | 22 - .../x/crypto/internal/poly1305/mac_noasm.go | 1 - .../x/crypto/internal/poly1305/sum_amd64.go | 1 - .../x/crypto/internal/poly1305/sum_amd64.s | 1 - .../x/crypto/internal/poly1305/sum_generic.go | 43 +- .../x/crypto/internal/poly1305/sum_ppc64le.go | 1 - .../x/crypto/internal/poly1305/sum_ppc64le.s | 15 +- .../x/crypto/internal/poly1305/sum_s390x.go | 1 - .../x/crypto/internal/poly1305/sum_s390x.s | 1 - vendor/golang.org/x/crypto/ssh/channel.go | 28 +- vendor/golang.org/x/crypto/ssh/client.go | 2 +- vendor/golang.org/x/crypto/ssh/client_auth.go | 20 +- vendor/golang.org/x/crypto/ssh/common.go | 11 +- vendor/golang.org/x/crypto/ssh/handshake.go | 63 +- vendor/golang.org/x/crypto/ssh/keys.go | 19 +- vendor/golang.org/x/crypto/ssh/server.go | 27 +- vendor/golang.org/x/crypto/ssh/tcpip.go | 35 + vendor/golang.org/x/crypto/ssh/transport.go | 32 +- vendor/golang.org/x/exp/LICENSE | 27 - vendor/golang.org/x/exp/PATENTS | 22 - vendor/golang.org/x/exp/maps/maps.go | 94 - vendor/golang.org/x/net/LICENSE | 27 - vendor/golang.org/x/net/PATENTS | 22 - vendor/golang.org/x/net/context/context.go | 56 - .../x/net/context/ctxhttp/ctxhttp.go | 71 - vendor/golang.org/x/net/context/go17.go | 73 - vendor/golang.org/x/net/context/go19.go | 21 - vendor/golang.org/x/net/context/pre_go17.go | 301 -- vendor/golang.org/x/net/context/pre_go19.go | 110 - vendor/golang.org/x/oauth2/README.md | 12 +- vendor/golang.org/x/oauth2/deviceauth.go | 198 ++ .../x/oauth2/internal/client_appengine.go | 1 - vendor/golang.org/x/oauth2/internal/oauth2.go | 2 +- vendor/golang.org/x/oauth2/internal/token.go | 134 +- vendor/golang.org/x/oauth2/oauth2.go | 64 +- vendor/golang.org/x/oauth2/pkce.go | 68 + vendor/golang.org/x/oauth2/token.go | 35 +- vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s | 1 - vendor/golang.org/x/sys/cpu/cpu_aix.go | 1 - vendor/golang.org/x/sys/cpu/cpu_arm64.s | 1 - vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go | 1 - vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go | 1 - vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 2 - .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_gccgo_s390x.go | 1 - vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c | 2 - vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 2 - vendor/golang.org/x/sys/cpu/cpu_linux.go | 1 - .../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 2 - .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 1 - .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 2 - vendor/golang.org/x/sys/cpu/cpu_loong64.go | 1 - vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 1 - vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 1 - vendor/golang.org/x/sys/cpu/cpu_other_arm.go | 1 - .../golang.org/x/sys/cpu/cpu_other_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_other_mips64x.go | 2 - .../golang.org/x/sys/cpu/cpu_other_ppc64x.go | 3 - .../golang.org/x/sys/cpu/cpu_other_riscv64.go | 1 - vendor/golang.org/x/sys/cpu/cpu_ppc64x.go | 1 - vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 1 - vendor/golang.org/x/sys/cpu/cpu_s390x.s | 1 - vendor/golang.org/x/sys/cpu/cpu_wasm.go | 1 - vendor/golang.org/x/sys/cpu/cpu_x86.go | 1 - vendor/golang.org/x/sys/cpu/cpu_x86.s | 2 - vendor/golang.org/x/sys/cpu/endian_big.go | 1 - vendor/golang.org/x/sys/cpu/endian_little.go | 1 - .../x/sys/cpu/proc_cpuinfo_linux.go | 1 - .../x/sys/cpu/runtime_auxv_go121.go | 1 - .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 1 - .../x/sys/cpu/syscall_aix_ppc64_gc.go | 1 - .../golang.org/x/sys/plan9/pwd_go15_plan9.go | 1 - vendor/golang.org/x/sys/plan9/pwd_plan9.go | 1 - vendor/golang.org/x/sys/plan9/race.go | 1 - vendor/golang.org/x/sys/plan9/race0.go | 1 - vendor/golang.org/x/sys/plan9/str.go | 1 - vendor/golang.org/x/sys/plan9/syscall.go | 1 - .../x/sys/plan9/zsyscall_plan9_386.go | 1 - .../x/sys/plan9/zsyscall_plan9_amd64.go | 1 - .../x/sys/plan9/zsyscall_plan9_arm.go | 1 - vendor/golang.org/x/sys/unix/aliases.go | 2 - vendor/golang.org/x/sys/unix/asm_aix_ppc64.s | 1 - vendor/golang.org/x/sys/unix/asm_bsd_386.s | 2 - vendor/golang.org/x/sys/unix/asm_bsd_amd64.s | 2 - vendor/golang.org/x/sys/unix/asm_bsd_arm.s | 2 - vendor/golang.org/x/sys/unix/asm_bsd_arm64.s | 2 - vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s | 2 - .../golang.org/x/sys/unix/asm_bsd_riscv64.s | 2 - vendor/golang.org/x/sys/unix/asm_linux_386.s | 1 - .../golang.org/x/sys/unix/asm_linux_amd64.s | 1 - vendor/golang.org/x/sys/unix/asm_linux_arm.s | 1 - .../golang.org/x/sys/unix/asm_linux_arm64.s | 3 - .../golang.org/x/sys/unix/asm_linux_loong64.s | 3 - .../golang.org/x/sys/unix/asm_linux_mips64x.s | 3 - .../golang.org/x/sys/unix/asm_linux_mipsx.s | 3 - .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 3 - .../golang.org/x/sys/unix/asm_linux_riscv64.s | 2 - .../golang.org/x/sys/unix/asm_linux_s390x.s | 3 - .../x/sys/unix/asm_openbsd_mips64.s | 1 - .../golang.org/x/sys/unix/asm_solaris_amd64.s | 1 - vendor/golang.org/x/sys/unix/asm_zos_s390x.s | 3 - vendor/golang.org/x/sys/unix/cap_freebsd.go | 1 - vendor/golang.org/x/sys/unix/constants.go | 1 - vendor/golang.org/x/sys/unix/dev_aix_ppc.go | 1 - vendor/golang.org/x/sys/unix/dev_aix_ppc64.go | 1 - vendor/golang.org/x/sys/unix/dev_zos.go | 1 - vendor/golang.org/x/sys/unix/dirent.go | 1 - vendor/golang.org/x/sys/unix/endian_big.go | 1 - vendor/golang.org/x/sys/unix/endian_little.go | 1 - vendor/golang.org/x/sys/unix/env_unix.go | 1 - vendor/golang.org/x/sys/unix/epoll_zos.go | 1 - vendor/golang.org/x/sys/unix/fcntl.go | 3 +- .../x/sys/unix/fcntl_linux_32bit.go | 1 - vendor/golang.org/x/sys/unix/fdset.go | 1 - vendor/golang.org/x/sys/unix/fstatfs_zos.go | 1 - vendor/golang.org/x/sys/unix/gccgo.go | 1 - vendor/golang.org/x/sys/unix/gccgo_c.c | 1 - .../x/sys/unix/gccgo_linux_amd64.go | 1 - vendor/golang.org/x/sys/unix/ifreq_linux.go | 1 - vendor/golang.org/x/sys/unix/ioctl_linux.go | 5 + vendor/golang.org/x/sys/unix/ioctl_signed.go | 1 - .../golang.org/x/sys/unix/ioctl_unsigned.go | 1 - vendor/golang.org/x/sys/unix/ioctl_zos.go | 1 - vendor/golang.org/x/sys/unix/mkerrors.sh | 43 +- vendor/golang.org/x/sys/unix/mmap_nomremap.go | 1 - vendor/golang.org/x/sys/unix/mremap.go | 1 - vendor/golang.org/x/sys/unix/pagesize_unix.go | 1 - .../golang.org/x/sys/unix/pledge_openbsd.go | 92 +- vendor/golang.org/x/sys/unix/ptrace_darwin.go | 1 - vendor/golang.org/x/sys/unix/ptrace_ios.go | 1 - vendor/golang.org/x/sys/unix/race.go | 1 - vendor/golang.org/x/sys/unix/race0.go | 1 - .../x/sys/unix/readdirent_getdents.go | 1 - .../x/sys/unix/readdirent_getdirentries.go | 1 - vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 1 - .../x/sys/unix/sockcmsg_unix_other.go | 1 - vendor/golang.org/x/sys/unix/syscall.go | 1 - vendor/golang.org/x/sys/unix/syscall_aix.go | 4 +- .../golang.org/x/sys/unix/syscall_aix_ppc.go | 1 - .../x/sys/unix/syscall_aix_ppc64.go | 1 - vendor/golang.org/x/sys/unix/syscall_bsd.go | 3 +- .../x/sys/unix/syscall_darwin_amd64.go | 1 - .../x/sys/unix/syscall_darwin_arm64.go | 1 - .../x/sys/unix/syscall_darwin_libSystem.go | 1 - .../x/sys/unix/syscall_dragonfly_amd64.go | 1 - .../x/sys/unix/syscall_freebsd_386.go | 1 - .../x/sys/unix/syscall_freebsd_amd64.go | 1 - .../x/sys/unix/syscall_freebsd_arm.go | 1 - .../x/sys/unix/syscall_freebsd_arm64.go | 1 - .../x/sys/unix/syscall_freebsd_riscv64.go | 1 - vendor/golang.org/x/sys/unix/syscall_hurd.go | 1 - .../golang.org/x/sys/unix/syscall_hurd_386.go | 1 - .../golang.org/x/sys/unix/syscall_illumos.go | 1 - vendor/golang.org/x/sys/unix/syscall_linux.go | 33 +- .../x/sys/unix/syscall_linux_386.go | 1 - .../x/sys/unix/syscall_linux_alarm.go | 2 - .../x/sys/unix/syscall_linux_amd64.go | 1 - .../x/sys/unix/syscall_linux_amd64_gc.go | 1 - .../x/sys/unix/syscall_linux_arm.go | 1 - .../x/sys/unix/syscall_linux_arm64.go | 1 - .../golang.org/x/sys/unix/syscall_linux_gc.go | 1 - .../x/sys/unix/syscall_linux_gc_386.go | 1 - .../x/sys/unix/syscall_linux_gc_arm.go | 1 - .../x/sys/unix/syscall_linux_gccgo_386.go | 1 - .../x/sys/unix/syscall_linux_gccgo_arm.go | 1 - .../x/sys/unix/syscall_linux_loong64.go | 1 - .../x/sys/unix/syscall_linux_mips64x.go | 2 - .../x/sys/unix/syscall_linux_mipsx.go | 2 - .../x/sys/unix/syscall_linux_ppc.go | 1 - .../x/sys/unix/syscall_linux_ppc64x.go | 2 - .../x/sys/unix/syscall_linux_riscv64.go | 1 - .../x/sys/unix/syscall_linux_s390x.go | 1 - .../x/sys/unix/syscall_linux_sparc64.go | 1 - .../x/sys/unix/syscall_netbsd_386.go | 1 - .../x/sys/unix/syscall_netbsd_amd64.go | 1 - .../x/sys/unix/syscall_netbsd_arm.go | 1 - .../x/sys/unix/syscall_netbsd_arm64.go | 1 - .../golang.org/x/sys/unix/syscall_openbsd.go | 28 +- .../x/sys/unix/syscall_openbsd_386.go | 1 - .../x/sys/unix/syscall_openbsd_amd64.go | 1 - .../x/sys/unix/syscall_openbsd_arm.go | 1 - .../x/sys/unix/syscall_openbsd_arm64.go | 1 - .../x/sys/unix/syscall_openbsd_libc.go | 1 - .../x/sys/unix/syscall_openbsd_ppc64.go | 1 - .../x/sys/unix/syscall_openbsd_riscv64.go | 1 - .../golang.org/x/sys/unix/syscall_solaris.go | 5 +- .../x/sys/unix/syscall_solaris_amd64.go | 1 - vendor/golang.org/x/sys/unix/syscall_unix.go | 1 - .../golang.org/x/sys/unix/syscall_unix_gc.go | 2 - .../x/sys/unix/syscall_unix_gc_ppc64x.go | 3 - .../x/sys/unix/syscall_zos_s390x.go | 3 +- vendor/golang.org/x/sys/unix/sysvshm_linux.go | 1 - vendor/golang.org/x/sys/unix/sysvshm_unix.go | 1 - .../x/sys/unix/sysvshm_unix_other.go | 1 - vendor/golang.org/x/sys/unix/timestruct.go | 1 - .../golang.org/x/sys/unix/unveil_openbsd.go | 41 +- vendor/golang.org/x/sys/unix/xattr_bsd.go | 1 - .../golang.org/x/sys/unix/zerrors_aix_ppc.go | 1 - .../x/sys/unix/zerrors_aix_ppc64.go | 1 - .../x/sys/unix/zerrors_darwin_amd64.go | 1 - .../x/sys/unix/zerrors_darwin_arm64.go | 1 - .../x/sys/unix/zerrors_dragonfly_amd64.go | 1 - .../x/sys/unix/zerrors_freebsd_386.go | 1 - .../x/sys/unix/zerrors_freebsd_amd64.go | 1 - .../x/sys/unix/zerrors_freebsd_arm.go | 1 - .../x/sys/unix/zerrors_freebsd_arm64.go | 1 - .../x/sys/unix/zerrors_freebsd_riscv64.go | 1 - vendor/golang.org/x/sys/unix/zerrors_linux.go | 104 +- .../x/sys/unix/zerrors_linux_386.go | 4 +- .../x/sys/unix/zerrors_linux_amd64.go | 4 +- .../x/sys/unix/zerrors_linux_arm.go | 4 +- .../x/sys/unix/zerrors_linux_arm64.go | 4 +- .../x/sys/unix/zerrors_linux_loong64.go | 5 +- .../x/sys/unix/zerrors_linux_mips.go | 4 +- .../x/sys/unix/zerrors_linux_mips64.go | 4 +- .../x/sys/unix/zerrors_linux_mips64le.go | 4 +- .../x/sys/unix/zerrors_linux_mipsle.go | 4 +- .../x/sys/unix/zerrors_linux_ppc.go | 4 +- .../x/sys/unix/zerrors_linux_ppc64.go | 4 +- .../x/sys/unix/zerrors_linux_ppc64le.go | 4 +- .../x/sys/unix/zerrors_linux_riscv64.go | 7 +- .../x/sys/unix/zerrors_linux_s390x.go | 4 +- .../x/sys/unix/zerrors_linux_sparc64.go | 4 +- .../x/sys/unix/zerrors_netbsd_386.go | 1 - .../x/sys/unix/zerrors_netbsd_amd64.go | 1 - .../x/sys/unix/zerrors_netbsd_arm.go | 1 - .../x/sys/unix/zerrors_netbsd_arm64.go | 1 - .../x/sys/unix/zerrors_openbsd_386.go | 1 - .../x/sys/unix/zerrors_openbsd_amd64.go | 1 - .../x/sys/unix/zerrors_openbsd_arm.go | 1 - .../x/sys/unix/zerrors_openbsd_arm64.go | 1 - .../x/sys/unix/zerrors_openbsd_mips64.go | 1 - .../x/sys/unix/zerrors_openbsd_ppc64.go | 1 - .../x/sys/unix/zerrors_openbsd_riscv64.go | 1 - .../x/sys/unix/zerrors_solaris_amd64.go | 1 - .../x/sys/unix/zerrors_zos_s390x.go | 1 - .../x/sys/unix/zptrace_armnn_linux.go | 2 - .../x/sys/unix/zptrace_mipsnn_linux.go | 2 - .../x/sys/unix/zptrace_mipsnnle_linux.go | 2 - .../x/sys/unix/zptrace_x86_linux.go | 2 - .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1 - .../x/sys/unix/zsyscall_aix_ppc64.go | 1 - .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 1 - .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 1 - .../x/sys/unix/zsyscall_darwin_amd64.go | 1 - .../x/sys/unix/zsyscall_darwin_arm64.go | 1 - .../x/sys/unix/zsyscall_dragonfly_amd64.go | 1 - .../x/sys/unix/zsyscall_freebsd_386.go | 1 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 1 - .../x/sys/unix/zsyscall_freebsd_arm.go | 1 - .../x/sys/unix/zsyscall_freebsd_arm64.go | 1 - .../x/sys/unix/zsyscall_freebsd_riscv64.go | 1 - .../x/sys/unix/zsyscall_illumos_amd64.go | 1 - .../golang.org/x/sys/unix/zsyscall_linux.go | 26 +- .../x/sys/unix/zsyscall_linux_386.go | 1 - .../x/sys/unix/zsyscall_linux_amd64.go | 1 - .../x/sys/unix/zsyscall_linux_arm.go | 1 - .../x/sys/unix/zsyscall_linux_arm64.go | 1 - .../x/sys/unix/zsyscall_linux_loong64.go | 1 - .../x/sys/unix/zsyscall_linux_mips.go | 1 - .../x/sys/unix/zsyscall_linux_mips64.go | 1 - .../x/sys/unix/zsyscall_linux_mips64le.go | 1 - .../x/sys/unix/zsyscall_linux_mipsle.go | 1 - .../x/sys/unix/zsyscall_linux_ppc.go | 1 - .../x/sys/unix/zsyscall_linux_ppc64.go | 1 - .../x/sys/unix/zsyscall_linux_ppc64le.go | 1 - .../x/sys/unix/zsyscall_linux_riscv64.go | 1 - .../x/sys/unix/zsyscall_linux_s390x.go | 1 - .../x/sys/unix/zsyscall_linux_sparc64.go | 1 - .../x/sys/unix/zsyscall_netbsd_386.go | 1 - .../x/sys/unix/zsyscall_netbsd_amd64.go | 1 - .../x/sys/unix/zsyscall_netbsd_arm.go | 1 - .../x/sys/unix/zsyscall_netbsd_arm64.go | 1 - .../x/sys/unix/zsyscall_openbsd_386.go | 70 +- .../x/sys/unix/zsyscall_openbsd_386.s | 20 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_amd64.s | 20 + .../x/sys/unix/zsyscall_openbsd_arm.go | 70 +- .../x/sys/unix/zsyscall_openbsd_arm.s | 20 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_arm64.s | 20 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_mips64.s | 20 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_ppc64.s | 24 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 70 +- .../x/sys/unix/zsyscall_openbsd_riscv64.s | 20 + .../x/sys/unix/zsyscall_solaris_amd64.go | 1 - .../x/sys/unix/zsyscall_zos_s390x.go | 1 - .../x/sys/unix/zsysctl_openbsd_386.go | 1 - .../x/sys/unix/zsysctl_openbsd_amd64.go | 1 - .../x/sys/unix/zsysctl_openbsd_arm.go | 1 - .../x/sys/unix/zsysctl_openbsd_arm64.go | 1 - .../x/sys/unix/zsysctl_openbsd_mips64.go | 1 - .../x/sys/unix/zsysctl_openbsd_ppc64.go | 1 - .../x/sys/unix/zsysctl_openbsd_riscv64.go | 1 - .../x/sys/unix/zsysnum_darwin_amd64.go | 1 - .../x/sys/unix/zsysnum_darwin_arm64.go | 1 - .../x/sys/unix/zsysnum_dragonfly_amd64.go | 1 - .../x/sys/unix/zsysnum_freebsd_386.go | 1 - .../x/sys/unix/zsysnum_freebsd_amd64.go | 1 - .../x/sys/unix/zsysnum_freebsd_arm.go | 1 - .../x/sys/unix/zsysnum_freebsd_arm64.go | 1 - .../x/sys/unix/zsysnum_freebsd_riscv64.go | 1 - .../x/sys/unix/zsysnum_linux_386.go | 6 +- .../x/sys/unix/zsysnum_linux_amd64.go | 6 +- .../x/sys/unix/zsysnum_linux_arm.go | 6 +- .../x/sys/unix/zsysnum_linux_arm64.go | 6 +- .../x/sys/unix/zsysnum_linux_loong64.go | 6 +- .../x/sys/unix/zsysnum_linux_mips.go | 6 +- .../x/sys/unix/zsysnum_linux_mips64.go | 6 +- .../x/sys/unix/zsysnum_linux_mips64le.go | 6 +- .../x/sys/unix/zsysnum_linux_mipsle.go | 6 +- .../x/sys/unix/zsysnum_linux_ppc.go | 6 +- .../x/sys/unix/zsysnum_linux_ppc64.go | 6 +- .../x/sys/unix/zsysnum_linux_ppc64le.go | 6 +- .../x/sys/unix/zsysnum_linux_riscv64.go | 6 +- .../x/sys/unix/zsysnum_linux_s390x.go | 6 +- .../x/sys/unix/zsysnum_linux_sparc64.go | 6 +- .../x/sys/unix/zsysnum_netbsd_386.go | 1 - .../x/sys/unix/zsysnum_netbsd_amd64.go | 1 - .../x/sys/unix/zsysnum_netbsd_arm.go | 1 - .../x/sys/unix/zsysnum_netbsd_arm64.go | 1 - .../x/sys/unix/zsysnum_openbsd_386.go | 1 - .../x/sys/unix/zsysnum_openbsd_amd64.go | 1 - .../x/sys/unix/zsysnum_openbsd_arm.go | 1 - .../x/sys/unix/zsysnum_openbsd_arm64.go | 1 - .../x/sys/unix/zsysnum_openbsd_mips64.go | 1 - .../x/sys/unix/zsysnum_openbsd_ppc64.go | 1 - .../x/sys/unix/zsysnum_openbsd_riscv64.go | 1 - .../x/sys/unix/zsysnum_zos_s390x.go | 1 - .../golang.org/x/sys/unix/ztypes_aix_ppc.go | 1 - .../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 1 - .../x/sys/unix/ztypes_darwin_amd64.go | 1 - .../x/sys/unix/ztypes_darwin_arm64.go | 1 - .../x/sys/unix/ztypes_dragonfly_amd64.go | 1 - .../x/sys/unix/ztypes_freebsd_386.go | 1 - .../x/sys/unix/ztypes_freebsd_amd64.go | 1 - .../x/sys/unix/ztypes_freebsd_arm.go | 1 - .../x/sys/unix/ztypes_freebsd_arm64.go | 1 - .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 - vendor/golang.org/x/sys/unix/ztypes_linux.go | 170 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 1 - .../x/sys/unix/ztypes_linux_amd64.go | 1 - .../golang.org/x/sys/unix/ztypes_linux_arm.go | 1 - .../x/sys/unix/ztypes_linux_arm64.go | 1 - .../x/sys/unix/ztypes_linux_loong64.go | 1 - .../x/sys/unix/ztypes_linux_mips.go | 1 - .../x/sys/unix/ztypes_linux_mips64.go | 1 - .../x/sys/unix/ztypes_linux_mips64le.go | 1 - .../x/sys/unix/ztypes_linux_mipsle.go | 1 - .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 1 - .../x/sys/unix/ztypes_linux_ppc64.go | 1 - .../x/sys/unix/ztypes_linux_ppc64le.go | 1 - .../x/sys/unix/ztypes_linux_riscv64.go | 1 - .../x/sys/unix/ztypes_linux_s390x.go | 1 - .../x/sys/unix/ztypes_linux_sparc64.go | 1 - .../x/sys/unix/ztypes_netbsd_386.go | 1 - .../x/sys/unix/ztypes_netbsd_amd64.go | 1 - .../x/sys/unix/ztypes_netbsd_arm.go | 1 - .../x/sys/unix/ztypes_netbsd_arm64.go | 1 - .../x/sys/unix/ztypes_openbsd_386.go | 1 - .../x/sys/unix/ztypes_openbsd_amd64.go | 1 - .../x/sys/unix/ztypes_openbsd_arm.go | 1 - .../x/sys/unix/ztypes_openbsd_arm64.go | 1 - .../x/sys/unix/ztypes_openbsd_mips64.go | 1 - .../x/sys/unix/ztypes_openbsd_ppc64.go | 1 - .../x/sys/unix/ztypes_openbsd_riscv64.go | 1 - .../x/sys/unix/ztypes_solaris_amd64.go | 1 - .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 1 - vendor/golang.org/x/sys/windows/aliases.go | 1 - vendor/golang.org/x/sys/windows/empty.s | 1 - .../golang.org/x/sys/windows/env_windows.go | 17 +- vendor/golang.org/x/sys/windows/eventlog.go | 1 - vendor/golang.org/x/sys/windows/mksyscall.go | 1 - vendor/golang.org/x/sys/windows/race.go | 1 - vendor/golang.org/x/sys/windows/race0.go | 1 - vendor/golang.org/x/sys/windows/service.go | 1 - vendor/golang.org/x/sys/windows/str.go | 1 - vendor/golang.org/x/sys/windows/syscall.go | 1 - .../x/sys/windows/syscall_windows.go | 10 +- .../golang.org/x/sys/windows/types_windows.go | 28 +- .../x/sys/windows/zsyscall_windows.go | 37 + vendor/golang.org/x/term/term_unix.go | 1 - vendor/golang.org/x/term/term_unix_bsd.go | 1 - vendor/golang.org/x/term/term_unix_other.go | 1 - vendor/golang.org/x/term/term_unsupported.go | 1 - .../appengine/internal/api.go | 347 +-- .../appengine/internal/api_classic.go | 29 +- .../appengine/internal/api_common.go | 50 +- .../appengine/internal/identity.go | 7 +- .../appengine/internal/identity_classic.go | 23 +- .../appengine/internal/identity_flex.go | 1 + .../appengine/internal/identity_vm.go | 20 +- .../appengine/internal/main.go | 1 + .../appengine/internal/main_vm.go | 3 +- .../appengine/internal/transaction.go | 10 +- .../appengine/urlfetch/urlfetch.go | 9 +- .../protobuf/encoding/prototext/decode.go | 8 +- .../protobuf/encoding/prototext/encode.go | 18 +- .../protobuf/encoding/protowire/wire.go | 36 +- .../protobuf/internal/descfmt/stringer.go | 183 +- .../protobuf/internal/encoding/text/decode.go | 5 +- .../internal/encoding/text/decode_number.go | 43 +- .../protobuf/internal/encoding/text/encode.go | 10 +- .../protobuf/internal/filedesc/desc.go | 47 +- .../protobuf/internal/genid/descriptor_gen.go | 306 +- .../protobuf/internal/genid/type_gen.go | 6 + .../protobuf/internal/impl/codec_gen.go | 113 +- .../protobuf/internal/impl/convert.go | 1 - .../protobuf/internal/impl/legacy_message.go | 19 +- .../protobuf/internal/impl/message.go | 17 +- .../protobuf/internal/impl/pointer_reflect.go | 36 + .../protobuf/internal/impl/pointer_unsafe.go | 40 + .../protobuf/internal/order/order.go | 2 +- ...ings_unsafe.go => strings_unsafe_go120.go} | 6 +- .../internal/strs/strings_unsafe_go121.go | 74 + .../protobuf/internal/version/version.go | 4 +- .../protobuf/proto/decode.go | 2 +- .../google.golang.org/protobuf/proto/doc.go | 67 +- .../protobuf/proto/encode.go | 2 +- .../google.golang.org/protobuf/proto/equal.go | 172 +- .../protobuf/proto/extension.go | 2 +- .../google.golang.org/protobuf/proto/merge.go | 2 +- .../google.golang.org/protobuf/proto/proto.go | 18 +- .../google.golang.org/protobuf/proto/size.go | 10 +- .../protobuf/reflect/protodesc/desc.go | 29 +- .../protobuf/reflect/protodesc/desc_init.go | 24 + .../protobuf/reflect/protodesc/editions.go | 177 ++ .../reflect/protodesc/editions_defaults.binpb | 4 + .../protobuf/reflect/protodesc/proto.go | 18 +- .../protobuf/reflect/protoreflect/proto.go | 83 +- .../reflect/protoreflect/source_gen.go | 93 + .../protobuf/reflect/protoreflect/type.go | 44 +- .../protobuf/reflect/protoreflect/value.go | 26 +- .../reflect/protoreflect/value_equal.go | 168 + .../reflect/protoreflect/value_union.go | 48 +- ...{value_unsafe.go => value_unsafe_go120.go} | 4 +- .../protoreflect/value_unsafe_go121.go | 87 + .../reflect/protoregistry/registry.go | 26 +- .../types/descriptorpb/descriptor.pb.go | 2739 +++++++++++++---- vendor/modules.txt | 45 +- 700 files changed, 23011 insertions(+), 17097 deletions(-) create mode 100644 vendor/github.com/Azure/go-ansiterm/SECURITY.md create mode 100644 vendor/github.com/moby/term/doc.go delete mode 100644 vendor/github.com/moby/term/tc.go create mode 100644 vendor/github.com/moby/term/term_unix.go rename vendor/github.com/moby/term/{termios.go => termios_unix.go} (50%) create mode 100644 vendor/github.com/moby/term/termios_windows.go delete mode 100644 vendor/github.com/moby/term/winsize.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go delete mode 100644 vendor/golang.org/x/exp/LICENSE delete mode 100644 vendor/golang.org/x/exp/PATENTS delete mode 100644 vendor/golang.org/x/exp/maps/maps.go delete mode 100644 vendor/golang.org/x/net/LICENSE delete mode 100644 vendor/golang.org/x/net/PATENTS delete mode 100644 vendor/golang.org/x/net/context/context.go delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go delete mode 100644 vendor/golang.org/x/net/context/go17.go delete mode 100644 vendor/golang.org/x/net/context/go19.go delete mode 100644 vendor/golang.org/x/net/context/pre_go17.go delete mode 100644 vendor/golang.org/x/net/context/pre_go19.go create mode 100644 vendor/golang.org/x/oauth2/deviceauth.go create mode 100644 vendor/golang.org/x/oauth2/pkce.go rename vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe.go => strings_unsafe_go120.go} (95%) create mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go create mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/editions.go create mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb create mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go rename vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe.go => value_unsafe_go120.go} (97%) create mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go diff --git a/go.mod b/go.mod index 89cd4c8d..b69cfd18 100644 --- a/go.mod +++ b/go.mod @@ -6,31 +6,29 @@ require ( github.com/docker/machine v0.16.2 github.com/golang/mock v1.6.0 github.com/hashicorp/go-multierror v1.1.1 - github.com/ionos-cloud/sdk-go/v6 v6.1.3 - github.com/stretchr/testify v1.8.1 + github.com/ionos-cloud/sdk-go/v6 v6.1.11 + github.com/stretchr/testify v1.9.0 ) require ( - github.com/tidwall/gjson v1.14.4 - golang.org/x/exp v0.0.0-20230118134722-a68e582fa157 + github.com/tidwall/gjson v1.17.1 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/docker v20.10.27+incompatible // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c // indirect + github.com/moby/term v0.5.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.2.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + golang.org/x/crypto v0.20.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.32.0 // indirect ) diff --git a/go.sum b/go.sum index 511608eb..a706a97c 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,6 @@ -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/docker v20.10.27+incompatible h1:Id/ZooynV4ZlD6xX20RCd3SR0Ikn7r4QZDa2ECK2TgA= @@ -10,85 +9,85 @@ github.com/docker/machine v0.16.2 h1:jyF9k3Zg+oIGxxSdYKPScyj3HqFZ6FjgA/3sblcASiU github.com/docker/machine v0.16.2/go.mod h1:I8mPNDeK1uH+JTcUU7X0ZW8KiYz0jyAgNaeSJ1rCfDI= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/ionos-cloud/sdk-go/v6 v6.1.3 h1:vb6yqdpiqaytvreM0bsn2pXw+1YDvEk2RKSmBAQvgDQ= -github.com/ionos-cloud/sdk-go/v6 v6.1.3/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= -github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c h1:RC8WMpjonrBfyAh6VN/POIPtYD5tRAq0qMqCRjQNK+g= -github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c/go.mod h1:9OcmHNQQUTbk4XCffrLgN1NEKc2mh5u++biHVrvHsSU= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= +github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= +github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20230118134722-a68e582fa157 h1:fiNkyhJPUvxbRPbCqY/D9qdjmPzfHcpK3P4bM4gioSY= -golang.org/x/exp v0.0.0-20230118134722-a68e582fa157/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU= -golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= diff --git a/internal/utils/nat.go b/internal/utils/nat.go index 0ee62aba..b65d04e7 100644 --- a/internal/utils/nat.go +++ b/internal/utils/nat.go @@ -10,7 +10,6 @@ import ( "github.com/ionos-cloud/docker-machine-driver/internal/pointer" "github.com/ionos-cloud/docker-machine-driver/pkg/sdk_utils" sdkgo "github.com/ionos-cloud/sdk-go/v6" - "golang.org/x/exp/maps" ) func (c *Client) GetNats(datacenterId string) (*sdkgo.NatGateways, error) { @@ -176,11 +175,19 @@ func natRulesStringToModel(rules []string, natPublicIp, sourceSubnet string) (*s return rule_models, nil } +func keysOfMap[K comparable, V any](m map[K]V) []K { + keys := make([]K, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + return keys +} + func (c *Client) CreateNat(datacenterId, name string, publicIps, flowlogs, natRules []string, lansToGateways map[string][]string, sourceSubnet string, skipDefaultRules bool) (*sdkgo.NatGateway, error) { var lans []sdkgo.NatGatewayLanProperties publicIp := publicIps[0] - err := c.createLansIfNotExist(datacenterId, maps.Keys(lansToGateways)) + err := c.createLansIfNotExist(datacenterId, keysOfMap(lansToGateways)) if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/go-ansiterm/SECURITY.md b/vendor/github.com/Azure/go-ansiterm/SECURITY.md new file mode 100644 index 00000000..e138ec5d --- /dev/null +++ b/vendor/github.com/Azure/go-ansiterm/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + + diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/README.md b/vendor/github.com/ionos-cloud/sdk-go/v6/README.md index df5137da..06910ecf 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/README.md +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/README.md @@ -47,14 +47,15 @@ go get github.com/ionos-cloud/sdk-go/v6@latest ## Environment Variables -| Environment Variable | Description | -|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `IONOS_USERNAME` | Specify the username used to login, to authenticate against the IONOS Cloud API | -| `IONOS_PASSWORD` | Specify the password used to login, to authenticate against the IONOS Cloud API | -| `IONOS_TOKEN` | Specify the token used to login, if a token is being used instead of username and password | -| `IONOS_API_URL` | Specify the API URL. It will overwrite the API endpoint default value `api.ionos.com`. Note: the host URL does not contain the `/cloudapi/v6` path, so it should _not_ be included in the `IONOS_API_URL` environment variable | -| `IONOS_LOGLEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace | -| `IONOS_PINNED_CERT` | Specify the SHA-256 public fingerprint here, enables certificate pinning | +| Environment Variable | Description | +|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `IONOS_USERNAME` | Specify the username used to login, to authenticate against the IONOS Cloud API | +| `IONOS_PASSWORD` | Specify the password used to login, to authenticate against the IONOS Cloud API | +| `IONOS_TOKEN` | Specify the token used to login, if a token is being used instead of username and password | +| `IONOS_API_URL` | Specify the API URL. It will overwrite the API endpoint default value `api.ionos.com`. Note: the host URL does not contain the `/cloudapi/v6` path, so it should _not_ be included in the `IONOS_API_URL` environment variable | +| `IONOS_LOG_LEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace | +| `IONOS_PINNED_CERT` | Specify the SHA-256 public fingerprint here, enables certificate pinning | +| `IONOS_CONTRACT_NUMBER` | Specify the contract number on which you wish to provision. Only valid for reseller accounts, for other types of accounts the header will be ignored | ⚠️ **_Note: To overwrite the api endpoint - `api.ionos.com`, the environment variable `$IONOS_API_URL` can be set, and used with `NewConfigurationFromEnv()` function._** @@ -278,25 +279,25 @@ All URIs are relative to *https://api.ionos.com/cloudapi/v6* Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -DefaultApi | [**ApiInfoGet**](docs/api/DefaultApi.md#apiinfoget) | **Get** / | Display API information -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete Application Load Balancers -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersfindbyapplicationloadbalancerid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Retrieve Application Load Balancers -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete ALB Flow Logs -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Retrieve ALB Flow Logs -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | List ALB Flow Logs -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogspatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially modify ALB Flow Logs -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogspost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create ALB Flow Logs -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify ALB Flow Logs -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete ALB forwarding rules -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesfindbyforwardingruleid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve ALB forwarding rules -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | List ALB forwarding rules -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulespatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify ALB forwarding rules -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulespost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create ALB forwarding rules -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify ALB forwarding rules -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers | List Application Load Balancers -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially modify Application Load Balancers -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancerspost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers | Create Application Load Balancers -ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify Application Load Balancers +DefaultApi | [**ApiInfoGet**](docs/api/DefaultApi.md#apiinfoget) | **Get** / | Get API information +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersfindbyapplicationloadbalancerid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogspatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogspost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesfindbyforwardingruleid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulespatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulespost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancerspost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer +ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID BackupUnitsApi | [**BackupunitsDelete**](docs/api/BackupUnitsApi.md#backupunitsdelete) | **Delete** /backupunits/{backupunitId} | Delete backup units BackupUnitsApi | [**BackupunitsFindById**](docs/api/BackupUnitsApi.md#backupunitsfindbyid) | **Get** /backupunits/{backupunitId} | Retrieve backup units BackupUnitsApi | [**BackupunitsGet**](docs/api/BackupUnitsApi.md#backupunitsget) | **Get** /backupunits | List backup units @@ -304,53 +305,53 @@ BackupUnitsApi | [**BackupunitsPatch**](docs/api/BackupUnitsApi.md#backupunitspa BackupUnitsApi | [**BackupunitsPost**](docs/api/BackupUnitsApi.md#backupunitspost) | **Post** /backupunits | Create backup units BackupUnitsApi | [**BackupunitsPut**](docs/api/BackupUnitsApi.md#backupunitsput) | **Put** /backupunits/{backupunitId} | Modify backup units BackupUnitsApi | [**BackupunitsSsourlGet**](docs/api/BackupUnitsApi.md#backupunitsssourlget) | **Get** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs -ContractResourcesApi | [**ContractsGet**](docs/api/ContractResourcesApi.md#contractsget) | **Get** /contracts | Retrieve contracts +ContractResourcesApi | [**ContractsGet**](docs/api/ContractResourcesApi.md#contractsget) | **Get** /contracts | Get Contract Information DataCentersApi | [**DatacentersDelete**](docs/api/DataCentersApi.md#datacentersdelete) | **Delete** /datacenters/{datacenterId} | Delete data centers DataCentersApi | [**DatacentersFindById**](docs/api/DataCentersApi.md#datacentersfindbyid) | **Get** /datacenters/{datacenterId} | Retrieve data centers DataCentersApi | [**DatacentersGet**](docs/api/DataCentersApi.md#datacentersget) | **Get** /datacenters | List your data centers -DataCentersApi | [**DatacentersPatch**](docs/api/DataCentersApi.md#datacenterspatch) | **Patch** /datacenters/{datacenterId} | Partially modify data centers -DataCentersApi | [**DatacentersPost**](docs/api/DataCentersApi.md#datacenterspost) | **Post** /datacenters | Create data centers -DataCentersApi | [**DatacentersPut**](docs/api/DataCentersApi.md#datacentersput) | **Put** /datacenters/{datacenterId} | Modify data centers +DataCentersApi | [**DatacentersPatch**](docs/api/DataCentersApi.md#datacenterspatch) | **Patch** /datacenters/{datacenterId} | Partially modify a Data Center by ID +DataCentersApi | [**DatacentersPost**](docs/api/DataCentersApi.md#datacenterspost) | **Post** /datacenters | Create a Data Center +DataCentersApi | [**DatacentersPut**](docs/api/DataCentersApi.md#datacentersput) | **Put** /datacenters/{datacenterId} | Modify a Data Center by ID FirewallRulesApi | [**DatacentersServersNicsFirewallrulesDelete**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesFindById**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesGet**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPatch**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulespatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules -FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPost**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulespost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create firewall rules -FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPut**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify firewall rules +FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPost**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulespost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule +FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPut**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule FlowLogsApi | [**DatacentersServersNicsFlowlogsDelete**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsFindById**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsGet**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsPatch**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogspatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs -FlowLogsApi | [**DatacentersServersNicsFlowlogsPost**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create Flow Logs +FlowLogsApi | [**DatacentersServersNicsFlowlogsPost**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log FlowLogsApi | [**DatacentersServersNicsFlowlogsPut**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs IPBlocksApi | [**IpblocksDelete**](docs/api/IPBlocksApi.md#ipblocksdelete) | **Delete** /ipblocks/{ipblockId} | Delete IP blocks IPBlocksApi | [**IpblocksFindById**](docs/api/IPBlocksApi.md#ipblocksfindbyid) | **Get** /ipblocks/{ipblockId} | Retrieve IP blocks IPBlocksApi | [**IpblocksGet**](docs/api/IPBlocksApi.md#ipblocksget) | **Get** /ipblocks | List IP blocks IPBlocksApi | [**IpblocksPatch**](docs/api/IPBlocksApi.md#ipblockspatch) | **Patch** /ipblocks/{ipblockId} | Partially modify IP blocks -IPBlocksApi | [**IpblocksPost**](docs/api/IPBlocksApi.md#ipblockspost) | **Post** /ipblocks | Reserve IP blocks -IPBlocksApi | [**IpblocksPut**](docs/api/IPBlocksApi.md#ipblocksput) | **Put** /ipblocks/{ipblockId} | Modify IP blocks +IPBlocksApi | [**IpblocksPost**](docs/api/IPBlocksApi.md#ipblockspost) | **Post** /ipblocks | Reserve a IP Block +IPBlocksApi | [**IpblocksPut**](docs/api/IPBlocksApi.md#ipblocksput) | **Put** /ipblocks/{ipblockId} | Modify a IP Block by ID ImagesApi | [**ImagesDelete**](docs/api/ImagesApi.md#imagesdelete) | **Delete** /images/{imageId} | Delete images ImagesApi | [**ImagesFindById**](docs/api/ImagesApi.md#imagesfindbyid) | **Get** /images/{imageId} | Retrieve images ImagesApi | [**ImagesGet**](docs/api/ImagesApi.md#imagesget) | **Get** /images | List images ImagesApi | [**ImagesPatch**](docs/api/ImagesApi.md#imagespatch) | **Patch** /images/{imageId} | Partially modify images -ImagesApi | [**ImagesPut**](docs/api/ImagesApi.md#imagesput) | **Put** /images/{imageId} | Modify images -KubernetesApi | [**K8sDelete**](docs/api/KubernetesApi.md#k8sdelete) | **Delete** /k8s/{k8sClusterId} | Delete Kubernetes clusters -KubernetesApi | [**K8sFindByClusterId**](docs/api/KubernetesApi.md#k8sfindbyclusterid) | **Get** /k8s/{k8sClusterId} | Retrieve Kubernetes clusters -KubernetesApi | [**K8sGet**](docs/api/KubernetesApi.md#k8sget) | **Get** /k8s | List Kubernetes clusters -KubernetesApi | [**K8sKubeconfigGet**](docs/api/KubernetesApi.md#k8skubeconfigget) | **Get** /k8s/{k8sClusterId}/kubeconfig | Retrieve Kubernetes configuration files -KubernetesApi | [**K8sNodepoolsDelete**](docs/api/KubernetesApi.md#k8snodepoolsdelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete Kubernetes node pools -KubernetesApi | [**K8sNodepoolsFindById**](docs/api/KubernetesApi.md#k8snodepoolsfindbyid) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Retrieve Kubernetes node pools -KubernetesApi | [**K8sNodepoolsGet**](docs/api/KubernetesApi.md#k8snodepoolsget) | **Get** /k8s/{k8sClusterId}/nodepools | List Kubernetes node pools -KubernetesApi | [**K8sNodepoolsNodesDelete**](docs/api/KubernetesApi.md#k8snodepoolsnodesdelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete Kubernetes nodes -KubernetesApi | [**K8sNodepoolsNodesFindById**](docs/api/KubernetesApi.md#k8snodepoolsnodesfindbyid) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Retrieve Kubernetes nodes -KubernetesApi | [**K8sNodepoolsNodesGet**](docs/api/KubernetesApi.md#k8snodepoolsnodesget) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | List Kubernetes nodes -KubernetesApi | [**K8sNodepoolsNodesReplacePost**](docs/api/KubernetesApi.md#k8snodepoolsnodesreplacepost) | **Post** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate Kubernetes nodes -KubernetesApi | [**K8sNodepoolsPost**](docs/api/KubernetesApi.md#k8snodepoolspost) | **Post** /k8s/{k8sClusterId}/nodepools | Create Kubernetes node pools -KubernetesApi | [**K8sNodepoolsPut**](docs/api/KubernetesApi.md#k8snodepoolsput) | **Put** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify Kubernetes node pools -KubernetesApi | [**K8sPost**](docs/api/KubernetesApi.md#k8spost) | **Post** /k8s | Create Kubernetes clusters -KubernetesApi | [**K8sPut**](docs/api/KubernetesApi.md#k8sput) | **Put** /k8s/{k8sClusterId} | Modify Kubernetes clusters -KubernetesApi | [**K8sVersionsDefaultGet**](docs/api/KubernetesApi.md#k8sversionsdefaultget) | **Get** /k8s/versions/default | Retrieve current default Kubernetes version -KubernetesApi | [**K8sVersionsGet**](docs/api/KubernetesApi.md#k8sversionsget) | **Get** /k8s/versions | List Kubernetes versions +ImagesApi | [**ImagesPut**](docs/api/ImagesApi.md#imagesput) | **Put** /images/{imageId} | Modify an Image by ID +KubernetesApi | [**K8sDelete**](docs/api/KubernetesApi.md#k8sdelete) | **Delete** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID +KubernetesApi | [**K8sFindByClusterId**](docs/api/KubernetesApi.md#k8sfindbyclusterid) | **Get** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID +KubernetesApi | [**K8sGet**](docs/api/KubernetesApi.md#k8sget) | **Get** /k8s | Get Kubernetes Clusters +KubernetesApi | [**K8sKubeconfigGet**](docs/api/KubernetesApi.md#k8skubeconfigget) | **Get** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File +KubernetesApi | [**K8sNodepoolsDelete**](docs/api/KubernetesApi.md#k8snodepoolsdelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID +KubernetesApi | [**K8sNodepoolsFindById**](docs/api/KubernetesApi.md#k8snodepoolsfindbyid) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID +KubernetesApi | [**K8sNodepoolsGet**](docs/api/KubernetesApi.md#k8snodepoolsget) | **Get** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools +KubernetesApi | [**K8sNodepoolsNodesDelete**](docs/api/KubernetesApi.md#k8snodepoolsnodesdelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID +KubernetesApi | [**K8sNodepoolsNodesFindById**](docs/api/KubernetesApi.md#k8snodepoolsnodesfindbyid) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID +KubernetesApi | [**K8sNodepoolsNodesGet**](docs/api/KubernetesApi.md#k8snodepoolsnodesget) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes +KubernetesApi | [**K8sNodepoolsNodesReplacePost**](docs/api/KubernetesApi.md#k8snodepoolsnodesreplacepost) | **Post** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID +KubernetesApi | [**K8sNodepoolsPost**](docs/api/KubernetesApi.md#k8snodepoolspost) | **Post** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool +KubernetesApi | [**K8sNodepoolsPut**](docs/api/KubernetesApi.md#k8snodepoolsput) | **Put** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID +KubernetesApi | [**K8sPost**](docs/api/KubernetesApi.md#k8spost) | **Post** /k8s | Create a Kubernetes Cluster +KubernetesApi | [**K8sPut**](docs/api/KubernetesApi.md#k8sput) | **Put** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID +KubernetesApi | [**K8sVersionsDefaultGet**](docs/api/KubernetesApi.md#k8sversionsdefaultget) | **Get** /k8s/versions/default | Get Default Kubernetes Version +KubernetesApi | [**K8sVersionsGet**](docs/api/KubernetesApi.md#k8sversionsget) | **Get** /k8s/versions | Get Kubernetes Versions LANsApi | [**DatacentersLansDelete**](docs/api/LANsApi.md#datacenterslansdelete) | **Delete** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs LANsApi | [**DatacentersLansFindById**](docs/api/LANsApi.md#datacenterslansfindbyid) | **Get** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs LANsApi | [**DatacentersLansGet**](docs/api/LANsApi.md#datacenterslansget) | **Get** /datacenters/{datacenterId}/lans | List LANs @@ -363,30 +364,30 @@ LANsApi | [**DatacentersLansPut**](docs/api/LANsApi.md#datacenterslansput) | **P LabelsApi | [**DatacentersLabelsDelete**](docs/api/LabelsApi.md#datacenterslabelsdelete) | **Delete** /datacenters/{datacenterId}/labels/{key} | Delete data center labels LabelsApi | [**DatacentersLabelsFindByKey**](docs/api/LabelsApi.md#datacenterslabelsfindbykey) | **Get** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels LabelsApi | [**DatacentersLabelsGet**](docs/api/LabelsApi.md#datacenterslabelsget) | **Get** /datacenters/{datacenterId}/labels | List data center labels -LabelsApi | [**DatacentersLabelsPost**](docs/api/LabelsApi.md#datacenterslabelspost) | **Post** /datacenters/{datacenterId}/labels | Create data center labels -LabelsApi | [**DatacentersLabelsPut**](docs/api/LabelsApi.md#datacenterslabelsput) | **Put** /datacenters/{datacenterId}/labels/{key} | Modify data center labels +LabelsApi | [**DatacentersLabelsPost**](docs/api/LabelsApi.md#datacenterslabelspost) | **Post** /datacenters/{datacenterId}/labels | Create a Data Center Label +LabelsApi | [**DatacentersLabelsPut**](docs/api/LabelsApi.md#datacenterslabelsput) | **Put** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key LabelsApi | [**DatacentersServersLabelsDelete**](docs/api/LabelsApi.md#datacentersserverslabelsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels LabelsApi | [**DatacentersServersLabelsFindByKey**](docs/api/LabelsApi.md#datacentersserverslabelsfindbykey) | **Get** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels LabelsApi | [**DatacentersServersLabelsGet**](docs/api/LabelsApi.md#datacentersserverslabelsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels -LabelsApi | [**DatacentersServersLabelsPost**](docs/api/LabelsApi.md#datacentersserverslabelspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/labels | Create server labels -LabelsApi | [**DatacentersServersLabelsPut**](docs/api/LabelsApi.md#datacentersserverslabelsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify server labels +LabelsApi | [**DatacentersServersLabelsPost**](docs/api/LabelsApi.md#datacentersserverslabelspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label +LabelsApi | [**DatacentersServersLabelsPut**](docs/api/LabelsApi.md#datacentersserverslabelsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label LabelsApi | [**DatacentersVolumesLabelsDelete**](docs/api/LabelsApi.md#datacentersvolumeslabelsdelete) | **Delete** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels LabelsApi | [**DatacentersVolumesLabelsFindByKey**](docs/api/LabelsApi.md#datacentersvolumeslabelsfindbykey) | **Get** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels LabelsApi | [**DatacentersVolumesLabelsGet**](docs/api/LabelsApi.md#datacentersvolumeslabelsget) | **Get** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels -LabelsApi | [**DatacentersVolumesLabelsPost**](docs/api/LabelsApi.md#datacentersvolumeslabelspost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create volume labels -LabelsApi | [**DatacentersVolumesLabelsPut**](docs/api/LabelsApi.md#datacentersvolumeslabelsput) | **Put** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify volume labels +LabelsApi | [**DatacentersVolumesLabelsPost**](docs/api/LabelsApi.md#datacentersvolumeslabelspost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label +LabelsApi | [**DatacentersVolumesLabelsPut**](docs/api/LabelsApi.md#datacentersvolumeslabelsput) | **Put** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label LabelsApi | [**IpblocksLabelsDelete**](docs/api/LabelsApi.md#ipblockslabelsdelete) | **Delete** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels LabelsApi | [**IpblocksLabelsFindByKey**](docs/api/LabelsApi.md#ipblockslabelsfindbykey) | **Get** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels LabelsApi | [**IpblocksLabelsGet**](docs/api/LabelsApi.md#ipblockslabelsget) | **Get** /ipblocks/{ipblockId}/labels | List IP block labels LabelsApi | [**IpblocksLabelsPost**](docs/api/LabelsApi.md#ipblockslabelspost) | **Post** /ipblocks/{ipblockId}/labels | Create IP block labels -LabelsApi | [**IpblocksLabelsPut**](docs/api/LabelsApi.md#ipblockslabelsput) | **Put** /ipblocks/{ipblockId}/labels/{key} | Modify IP block labels +LabelsApi | [**IpblocksLabelsPut**](docs/api/LabelsApi.md#ipblockslabelsput) | **Put** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID LabelsApi | [**LabelsFindByUrn**](docs/api/LabelsApi.md#labelsfindbyurn) | **Get** /labels/{labelurn} | Retrieve labels by URN LabelsApi | [**LabelsGet**](docs/api/LabelsApi.md#labelsget) | **Get** /labels | List labels LabelsApi | [**SnapshotsLabelsDelete**](docs/api/LabelsApi.md#snapshotslabelsdelete) | **Delete** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels LabelsApi | [**SnapshotsLabelsFindByKey**](docs/api/LabelsApi.md#snapshotslabelsfindbykey) | **Get** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels LabelsApi | [**SnapshotsLabelsGet**](docs/api/LabelsApi.md#snapshotslabelsget) | **Get** /snapshots/{snapshotId}/labels | List snapshot labels -LabelsApi | [**SnapshotsLabelsPost**](docs/api/LabelsApi.md#snapshotslabelspost) | **Post** /snapshots/{snapshotId}/labels | Create snapshot labels -LabelsApi | [**SnapshotsLabelsPut**](docs/api/LabelsApi.md#snapshotslabelsput) | **Put** /snapshots/{snapshotId}/labels/{key} | Modify snapshot labels +LabelsApi | [**SnapshotsLabelsPost**](docs/api/LabelsApi.md#snapshotslabelspost) | **Post** /snapshots/{snapshotId}/labels | Create a Snapshot Label +LabelsApi | [**SnapshotsLabelsPut**](docs/api/LabelsApi.md#snapshotslabelsput) | **Put** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsDelete**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicsdelete) | **Delete** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsFindByNicId**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicsfindbynicid) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsGet**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicsget) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs @@ -395,34 +396,34 @@ LoadBalancersApi | [**DatacentersLoadbalancersDelete**](docs/api/LoadBalancersAp LoadBalancersApi | [**DatacentersLoadbalancersFindById**](docs/api/LoadBalancersApi.md#datacentersloadbalancersfindbyid) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers LoadBalancersApi | [**DatacentersLoadbalancersGet**](docs/api/LoadBalancersApi.md#datacentersloadbalancersget) | **Get** /datacenters/{datacenterId}/loadbalancers | List Load Balancers LoadBalancersApi | [**DatacentersLoadbalancersPatch**](docs/api/LoadBalancersApi.md#datacentersloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers -LoadBalancersApi | [**DatacentersLoadbalancersPost**](docs/api/LoadBalancersApi.md#datacentersloadbalancerspost) | **Post** /datacenters/{datacenterId}/loadbalancers | Create Load Balancers -LoadBalancersApi | [**DatacentersLoadbalancersPut**](docs/api/LoadBalancersApi.md#datacentersloadbalancersput) | **Put** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify Load Balancers -LocationsApi | [**LocationsFindByRegionId**](docs/api/LocationsApi.md#locationsfindbyregionid) | **Get** /locations/{regionId} | List locations within regions -LocationsApi | [**LocationsFindByRegionIdAndId**](docs/api/LocationsApi.md#locationsfindbyregionidandid) | **Get** /locations/{regionId}/{locationId} | Retrieve specified locations -LocationsApi | [**LocationsGet**](docs/api/LocationsApi.md#locationsget) | **Get** /locations | List locations +LoadBalancersApi | [**DatacentersLoadbalancersPost**](docs/api/LoadBalancersApi.md#datacentersloadbalancerspost) | **Post** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer +LoadBalancersApi | [**DatacentersLoadbalancersPut**](docs/api/LoadBalancersApi.md#datacentersloadbalancersput) | **Put** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID +LocationsApi | [**LocationsFindByRegionId**](docs/api/LocationsApi.md#locationsfindbyregionid) | **Get** /locations/{regionId} | Get Locations within a Region +LocationsApi | [**LocationsFindByRegionIdAndId**](docs/api/LocationsApi.md#locationsfindbyregionidandid) | **Get** /locations/{regionId}/{locationId} | Get Location by ID +LocationsApi | [**LocationsGet**](docs/api/LocationsApi.md#locationsget) | **Get** /locations | Get Locations NATGatewaysApi | [**DatacentersNatgatewaysDelete**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysdelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysFindByNatGatewayId**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysfindbynatgatewayid) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsDelete**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsdelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsFindByFlowLogId**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsGet**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsget) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogspatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs -NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogspost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create NAT Gateway Flow Logs +NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogspost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysGet**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysget) | **Get** /datacenters/{datacenterId}/natgateways | List NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewayspatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways -NATGatewaysApi | [**DatacentersNatgatewaysPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewayspost) | **Post** /datacenters/{datacenterId}/natgateways | Create NAT Gateways +NATGatewaysApi | [**DatacentersNatgatewaysPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewayspost) | **Post** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway NATGatewaysApi | [**DatacentersNatgatewaysPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysRulesDelete**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesdelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules NATGatewaysApi | [**DatacentersNatgatewaysRulesFindByNatGatewayRuleId**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesfindbynatgatewayruleid) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules NATGatewaysApi | [**DatacentersNatgatewaysRulesGet**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesget) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules -NATGatewaysApi | [**DatacentersNatgatewaysRulesPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulespatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially modify NAT Gateway rules -NATGatewaysApi | [**DatacentersNatgatewaysRulesPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulespost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create NAT Gateway rules -NATGatewaysApi | [**DatacentersNatgatewaysRulesPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify NAT Gateway rules +NATGatewaysApi | [**DatacentersNatgatewaysRulesPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulespatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID +NATGatewaysApi | [**DatacentersNatgatewaysRulesPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulespost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule +NATGatewaysApi | [**DatacentersNatgatewaysRulesPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID NetworkInterfacesApi | [**DatacentersServersNicsDelete**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs NetworkInterfacesApi | [**DatacentersServersNicsFindById**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs NetworkInterfacesApi | [**DatacentersServersNicsGet**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs NetworkInterfacesApi | [**DatacentersServersNicsPatch**](docs/api/NetworkInterfacesApi.md#datacentersserversnicspatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs -NetworkInterfacesApi | [**DatacentersServersNicsPost**](docs/api/NetworkInterfacesApi.md#datacentersserversnicspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics | Create NICs +NetworkInterfacesApi | [**DatacentersServersNicsPost**](docs/api/NetworkInterfacesApi.md#datacentersserversnicspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC NetworkInterfacesApi | [**DatacentersServersNicsPut**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersDelete**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersdelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersfindbynetworkloadbalancerid) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers @@ -430,61 +431,61 @@ NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsDelete**](do NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsGet**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsget) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPatch**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogspatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs -NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogspost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create NLB Flow Logs +NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogspost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPut**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsput) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesDelete**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesdelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesfindbyforwardingruleid) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesGet**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesget) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPatch**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulespatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules -NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulespost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create NLB forwarding rules +NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulespost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPut**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesput) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersGet**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersget) | **Get** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPatch**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers -NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancerspost) | **Post** /datacenters/{datacenterId}/networkloadbalancers | Create Network Load Balancers +NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancerspost) | **Post** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPut**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersput) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers PrivateCrossConnectsApi | [**PccsDelete**](docs/api/PrivateCrossConnectsApi.md#pccsdelete) | **Delete** /pccs/{pccId} | Delete private Cross-Connects PrivateCrossConnectsApi | [**PccsFindById**](docs/api/PrivateCrossConnectsApi.md#pccsfindbyid) | **Get** /pccs/{pccId} | Retrieve private Cross-Connects PrivateCrossConnectsApi | [**PccsGet**](docs/api/PrivateCrossConnectsApi.md#pccsget) | **Get** /pccs | List private Cross-Connects PrivateCrossConnectsApi | [**PccsPatch**](docs/api/PrivateCrossConnectsApi.md#pccspatch) | **Patch** /pccs/{pccId} | Partially modify private Cross-Connects -PrivateCrossConnectsApi | [**PccsPost**](docs/api/PrivateCrossConnectsApi.md#pccspost) | **Post** /pccs | Create private Cross-Connects +PrivateCrossConnectsApi | [**PccsPost**](docs/api/PrivateCrossConnectsApi.md#pccspost) | **Post** /pccs | Create a Private Cross-Connect RequestsApi | [**RequestsFindById**](docs/api/RequestsApi.md#requestsfindbyid) | **Get** /requests/{requestId} | Retrieve requests RequestsApi | [**RequestsGet**](docs/api/RequestsApi.md#requestsget) | **Get** /requests | List requests RequestsApi | [**RequestsStatusGet**](docs/api/RequestsApi.md#requestsstatusget) | **Get** /requests/{requestId}/status | Retrieve request status -ServersApi | [**DatacentersServersCdromsDelete**](docs/api/ServersApi.md#datacentersserverscdromsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach CD-ROMs -ServersApi | [**DatacentersServersCdromsFindById**](docs/api/ServersApi.md#datacentersserverscdromsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Retrieve attached CD-ROMs -ServersApi | [**DatacentersServersCdromsGet**](docs/api/ServersApi.md#datacentersserverscdromsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms | List attached CD-ROMs -ServersApi | [**DatacentersServersCdromsPost**](docs/api/ServersApi.md#datacentersserverscdromspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach CD-ROMs +ServersApi | [**DatacentersServersCdromsDelete**](docs/api/ServersApi.md#datacentersserverscdromsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID +ServersApi | [**DatacentersServersCdromsFindById**](docs/api/ServersApi.md#datacentersserverscdromsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID +ServersApi | [**DatacentersServersCdromsGet**](docs/api/ServersApi.md#datacentersserverscdromsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs +ServersApi | [**DatacentersServersCdromsPost**](docs/api/ServersApi.md#datacentersserverscdromspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM ServersApi | [**DatacentersServersDelete**](docs/api/ServersApi.md#datacentersserversdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId} | Delete servers ServersApi | [**DatacentersServersFindById**](docs/api/ServersApi.md#datacentersserversfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID ServersApi | [**DatacentersServersGet**](docs/api/ServersApi.md#datacentersserversget) | **Get** /datacenters/{datacenterId}/servers | List servers ServersApi | [**DatacentersServersPatch**](docs/api/ServersApi.md#datacentersserverspatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers -ServersApi | [**DatacentersServersPost**](docs/api/ServersApi.md#datacentersserverspost) | **Post** /datacenters/{datacenterId}/servers | Create servers -ServersApi | [**DatacentersServersPut**](docs/api/ServersApi.md#datacentersserversput) | **Put** /datacenters/{datacenterId}/servers/{serverId} | Modify servers +ServersApi | [**DatacentersServersPost**](docs/api/ServersApi.md#datacentersserverspost) | **Post** /datacenters/{datacenterId}/servers | Create a Server +ServersApi | [**DatacentersServersPut**](docs/api/ServersApi.md#datacentersserversput) | **Put** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID ServersApi | [**DatacentersServersRebootPost**](docs/api/ServersApi.md#datacentersserversrebootpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers ServersApi | [**DatacentersServersRemoteConsoleGet**](docs/api/ServersApi.md#datacentersserversremoteconsoleget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link -ServersApi | [**DatacentersServersResumePost**](docs/api/ServersApi.md#datacentersserversresumepost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume Cubes instances -ServersApi | [**DatacentersServersStartPost**](docs/api/ServersApi.md#datacentersserversstartpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/start | Start servers -ServersApi | [**DatacentersServersStopPost**](docs/api/ServersApi.md#datacentersserversstoppost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop VMs -ServersApi | [**DatacentersServersSuspendPost**](docs/api/ServersApi.md#datacentersserverssuspendpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend Cubes instances +ServersApi | [**DatacentersServersResumePost**](docs/api/ServersApi.md#datacentersserversresumepost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID +ServersApi | [**DatacentersServersStartPost**](docs/api/ServersApi.md#datacentersserversstartpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID +ServersApi | [**DatacentersServersStopPost**](docs/api/ServersApi.md#datacentersserversstoppost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID +ServersApi | [**DatacentersServersSuspendPost**](docs/api/ServersApi.md#datacentersserverssuspendpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID ServersApi | [**DatacentersServersTokenGet**](docs/api/ServersApi.md#datacentersserverstokenget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/token | Get JASON Web Token -ServersApi | [**DatacentersServersUpgradePost**](docs/api/ServersApi.md#datacentersserversupgradepost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade servers -ServersApi | [**DatacentersServersVolumesDelete**](docs/api/ServersApi.md#datacentersserversvolumesdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach volumes -ServersApi | [**DatacentersServersVolumesFindById**](docs/api/ServersApi.md#datacentersserversvolumesfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Retrieve attached volumes -ServersApi | [**DatacentersServersVolumesGet**](docs/api/ServersApi.md#datacentersserversvolumesget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes | List attached volumes -ServersApi | [**DatacentersServersVolumesPost**](docs/api/ServersApi.md#datacentersserversvolumespost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach volumes +ServersApi | [**DatacentersServersUpgradePost**](docs/api/ServersApi.md#datacentersserversupgradepost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID +ServersApi | [**DatacentersServersVolumesDelete**](docs/api/ServersApi.md#datacentersserversvolumesdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID +ServersApi | [**DatacentersServersVolumesFindById**](docs/api/ServersApi.md#datacentersserversvolumesfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID +ServersApi | [**DatacentersServersVolumesGet**](docs/api/ServersApi.md#datacentersserversvolumesget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes +ServersApi | [**DatacentersServersVolumesPost**](docs/api/ServersApi.md#datacentersserversvolumespost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server SnapshotsApi | [**SnapshotsDelete**](docs/api/SnapshotsApi.md#snapshotsdelete) | **Delete** /snapshots/{snapshotId} | Delete snapshots SnapshotsApi | [**SnapshotsFindById**](docs/api/SnapshotsApi.md#snapshotsfindbyid) | **Get** /snapshots/{snapshotId} | Retrieve snapshots by ID SnapshotsApi | [**SnapshotsGet**](docs/api/SnapshotsApi.md#snapshotsget) | **Get** /snapshots | List snapshots SnapshotsApi | [**SnapshotsPatch**](docs/api/SnapshotsApi.md#snapshotspatch) | **Patch** /snapshots/{snapshotId} | Partially modify snapshots -SnapshotsApi | [**SnapshotsPut**](docs/api/SnapshotsApi.md#snapshotsput) | **Put** /snapshots/{snapshotId} | Modify snapshots -TargetGroupsApi | [**TargetGroupsDelete**](docs/api/TargetGroupsApi.md#targetgroupsdelete) | **Delete** /targetgroups/{targetGroupId} | Remove target groups -TargetGroupsApi | [**TargetgroupsFindByTargetGroupId**](docs/api/TargetGroupsApi.md#targetgroupsfindbytargetgroupid) | **Get** /targetgroups/{targetGroupId} | Retrieve target groups -TargetGroupsApi | [**TargetgroupsGet**](docs/api/TargetGroupsApi.md#targetgroupsget) | **Get** /targetgroups | List target groups -TargetGroupsApi | [**TargetgroupsPatch**](docs/api/TargetGroupsApi.md#targetgroupspatch) | **Patch** /targetgroups/{targetGroupId} | Partially modify target groups -TargetGroupsApi | [**TargetgroupsPost**](docs/api/TargetGroupsApi.md#targetgroupspost) | **Post** /targetgroups | Create target groups -TargetGroupsApi | [**TargetgroupsPut**](docs/api/TargetGroupsApi.md#targetgroupsput) | **Put** /targetgroups/{targetGroupId} | Modify target groups -TemplatesApi | [**TemplatesFindById**](docs/api/TemplatesApi.md#templatesfindbyid) | **Get** /templates/{templateId} | Retrieve Cubes Templates -TemplatesApi | [**TemplatesGet**](docs/api/TemplatesApi.md#templatesget) | **Get** /templates | List Cubes Templates +SnapshotsApi | [**SnapshotsPut**](docs/api/SnapshotsApi.md#snapshotsput) | **Put** /snapshots/{snapshotId} | Modify a Snapshot by ID +TargetGroupsApi | [**TargetGroupsDelete**](docs/api/TargetGroupsApi.md#targetgroupsdelete) | **Delete** /targetgroups/{targetGroupId} | Delete a Target Group by ID +TargetGroupsApi | [**TargetgroupsFindByTargetGroupId**](docs/api/TargetGroupsApi.md#targetgroupsfindbytargetgroupid) | **Get** /targetgroups/{targetGroupId} | Get a Target Group by ID +TargetGroupsApi | [**TargetgroupsGet**](docs/api/TargetGroupsApi.md#targetgroupsget) | **Get** /targetgroups | Get Target Groups +TargetGroupsApi | [**TargetgroupsPatch**](docs/api/TargetGroupsApi.md#targetgroupspatch) | **Patch** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID +TargetGroupsApi | [**TargetgroupsPost**](docs/api/TargetGroupsApi.md#targetgroupspost) | **Post** /targetgroups | Create a Target Group +TargetGroupsApi | [**TargetgroupsPut**](docs/api/TargetGroupsApi.md#targetgroupsput) | **Put** /targetgroups/{targetGroupId} | Modify a Target Group by ID +TemplatesApi | [**TemplatesFindById**](docs/api/TemplatesApi.md#templatesfindbyid) | **Get** /templates/{templateId} | Get Cubes Template by ID +TemplatesApi | [**TemplatesGet**](docs/api/TemplatesApi.md#templatesget) | **Get** /templates | Get Cubes Templates UserManagementApi | [**UmGroupsDelete**](docs/api/UserManagementApi.md#umgroupsdelete) | **Delete** /um/groups/{groupId} | Delete groups UserManagementApi | [**UmGroupsFindById**](docs/api/UserManagementApi.md#umgroupsfindbyid) | **Get** /um/groups/{groupId} | Retrieve groups UserManagementApi | [**UmGroupsGet**](docs/api/UserManagementApi.md#umgroupsget) | **Get** /um/groups | List all groups @@ -498,7 +499,7 @@ UserManagementApi | [**UmGroupsSharesPost**](docs/api/UserManagementApi.md#umgro UserManagementApi | [**UmGroupsSharesPut**](docs/api/UserManagementApi.md#umgroupssharesput) | **Put** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges UserManagementApi | [**UmGroupsUsersDelete**](docs/api/UserManagementApi.md#umgroupsusersdelete) | **Delete** /um/groups/{groupId}/users/{userId} | Remove users from groups UserManagementApi | [**UmGroupsUsersGet**](docs/api/UserManagementApi.md#umgroupsusersget) | **Get** /um/groups/{groupId}/users | List group members -UserManagementApi | [**UmGroupsUsersPost**](docs/api/UserManagementApi.md#umgroupsuserspost) | **Post** /um/groups/{groupId}/users | Add group members +UserManagementApi | [**UmGroupsUsersPost**](docs/api/UserManagementApi.md#umgroupsuserspost) | **Post** /um/groups/{groupId}/users | Add a Group Member UserManagementApi | [**UmResourcesFindByType**](docs/api/UserManagementApi.md#umresourcesfindbytype) | **Get** /um/resources/{resourceType} | List resources by type UserManagementApi | [**UmResourcesFindByTypeAndId**](docs/api/UserManagementApi.md#umresourcesfindbytypeandid) | **Get** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type UserManagementApi | [**UmResourcesGet**](docs/api/UserManagementApi.md#umresourcesget) | **Get** /um/resources | List all resources @@ -513,15 +514,15 @@ UserS3KeysApi | [**UmUsersS3keysDelete**](docs/api/UserS3KeysApi.md#umuserss3key UserS3KeysApi | [**UmUsersS3keysFindByKeyId**](docs/api/UserS3KeysApi.md#umuserss3keysfindbykeyid) | **Get** /um/users/{userId}/s3keys/{keyId} | Retrieve user S3 keys by key ID UserS3KeysApi | [**UmUsersS3keysGet**](docs/api/UserS3KeysApi.md#umuserss3keysget) | **Get** /um/users/{userId}/s3keys | List user S3 keys UserS3KeysApi | [**UmUsersS3keysPost**](docs/api/UserS3KeysApi.md#umuserss3keyspost) | **Post** /um/users/{userId}/s3keys | Create user S3 keys -UserS3KeysApi | [**UmUsersS3keysPut**](docs/api/UserS3KeysApi.md#umuserss3keysput) | **Put** /um/users/{userId}/s3keys/{keyId} | Modify S3 keys by key ID +UserS3KeysApi | [**UmUsersS3keysPut**](docs/api/UserS3KeysApi.md#umuserss3keysput) | **Put** /um/users/{userId}/s3keys/{keyId} | Modify a S3 Key by Key ID UserS3KeysApi | [**UmUsersS3ssourlGet**](docs/api/UserS3KeysApi.md#umuserss3ssourlget) | **Get** /um/users/{userId}/s3ssourl | Retrieve S3 single sign-on URLs VolumesApi | [**DatacentersVolumesCreateSnapshotPost**](docs/api/VolumesApi.md#datacentersvolumescreatesnapshotpost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots VolumesApi | [**DatacentersVolumesDelete**](docs/api/VolumesApi.md#datacentersvolumesdelete) | **Delete** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes VolumesApi | [**DatacentersVolumesFindById**](docs/api/VolumesApi.md#datacentersvolumesfindbyid) | **Get** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes VolumesApi | [**DatacentersVolumesGet**](docs/api/VolumesApi.md#datacentersvolumesget) | **Get** /datacenters/{datacenterId}/volumes | List volumes VolumesApi | [**DatacentersVolumesPatch**](docs/api/VolumesApi.md#datacentersvolumespatch) | **Patch** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes -VolumesApi | [**DatacentersVolumesPost**](docs/api/VolumesApi.md#datacentersvolumespost) | **Post** /datacenters/{datacenterId}/volumes | Create volumes -VolumesApi | [**DatacentersVolumesPut**](docs/api/VolumesApi.md#datacentersvolumesput) | **Put** /datacenters/{datacenterId}/volumes/{volumeId} | Modify volumes +VolumesApi | [**DatacentersVolumesPost**](docs/api/VolumesApi.md#datacentersvolumespost) | **Post** /datacenters/{datacenterId}/volumes | Create a Volume +VolumesApi | [**DatacentersVolumesPut**](docs/api/VolumesApi.md#datacentersvolumesput) | **Put** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID VolumesApi | [**DatacentersVolumesRestoreSnapshotPost**](docs/api/VolumesApi.md#datacentersvolumesrestoresnapshotpost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots @@ -733,6 +734,8 @@ Due to the fact that model structure members are all pointers, this package cont a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it: +Deprecated in favor of ToPtr that uses generics + * `PtrBool` * `PtrInt` * `PtrInt32` diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/api_.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_.go index 0b600d56..999b9d56 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_application_load_balancers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_application_load_balancers.go index 8121b5ff..edbabd25 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_application_load_balancers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/api_application_load_balancers.go @@ -13,7 +13,7 @@ package ionoscloud import ( _context "context" "fmt" - _ioutil "io/ioutil" + "io" _nethttp "net/http" _neturl "net/url" "strings" @@ -55,8 +55,8 @@ func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Execute() (*APIResp } /* - * DatacentersApplicationloadbalancersDelete Delete Application Load Balancers - * Remove the specified Application Load Balancer from the data center.. + * 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. @@ -166,7 +166,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -220,8 +220,8 @@ func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdReq } /* - * DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId Retrieve Application Load Balancers - * Retrieve the properties of the specified Application Load Balancer within the data center. + * 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. @@ -333,7 +333,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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,12 +398,12 @@ func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Execute() ( } /* - * DatacentersApplicationloadbalancersFlowlogsDelete Delete ALB Flow Logs - * Delete the specified Application Load Balancer Flow Log. + * 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. + * @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 { @@ -512,7 +512,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -567,12 +567,12 @@ func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Ex } /* - * DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId Retrieve ALB Flow Logs - * Retrieve the specified Application Load Balancer Flow Log. + * 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. + * @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 { @@ -683,7 +683,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) XContractNumbe // 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] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -769,8 +769,8 @@ func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Execute() (Flo } /* - * DatacentersApplicationloadbalancersFlowlogsGet List ALB Flow Logs - * List the Flow Logs for the specified Application Load Balancer. + * 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. @@ -896,7 +896,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -966,12 +966,12 @@ func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Execute() (F } /* - * DatacentersApplicationloadbalancersFlowlogsPatch Partially modify ALB Flow Logs - * Update the properties of the specified Application Load Balancer Flow Log. + * 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. + * @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 { @@ -1087,7 +1087,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Execute() (Fl } /* - * DatacentersApplicationloadbalancersFlowlogsPost Create ALB Flow Logs - * Add a new Flow Log for the Application Load Balancer. + * 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. @@ -1274,7 +1274,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -1344,12 +1344,12 @@ func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Execute() (Flo } /* - * DatacentersApplicationloadbalancersFlowlogsPut Modify ALB Flow Logs - * Modify the specified Application Load Balancer Flow Log. + * 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. + * @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 { @@ -1465,7 +1465,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -1530,8 +1530,8 @@ func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Exec } /* - * DatacentersApplicationloadbalancersForwardingrulesDelete Delete ALB forwarding rules - * Delete the specified Application Load Balancer forwarding rule. + * 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. @@ -1644,7 +1644,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers return localVarAPIResponse, err } - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { @@ -1699,8 +1699,8 @@ func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRul } /* - * DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId Retrieve ALB forwarding rules - * Retrieve the specified Application Load Balancer forwarding rule. + * 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. @@ -1815,7 +1815,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) XContra // 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] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -1901,8 +1901,8 @@ func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Execute } /* - * DatacentersApplicationloadbalancersForwardingrulesGet List ALB forwarding rules - * List the forwarding rules for the specified Application Load Balancer. + * 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. @@ -2028,7 +2028,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -2098,8 +2098,8 @@ func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Execu } /* - * DatacentersApplicationloadbalancersForwardingrulesPatch Partially modify ALB forwarding rules - * Update the properties of the specified Application Load Balancer forwarding rule. + * 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. @@ -2219,7 +2219,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Execut } /* - * DatacentersApplicationloadbalancersForwardingrulesPost Create ALB forwarding rules - * Create a forwarding rule for the Application Load Balancer. + * 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. @@ -2406,7 +2406,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -2476,8 +2476,8 @@ func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Execute } /* - * DatacentersApplicationloadbalancersForwardingrulesPut Modify ALB forwarding rules - * Modify the specified Application Load Balancer forwarding rule. + * 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. @@ -2597,7 +2597,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 ApiDatacentersApplicationloadbalancersGetRequest) Limit(limit int32) Api // 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] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -2692,8 +2692,8 @@ func (r ApiDatacentersApplicationloadbalancersGetRequest) Execute() (Application } /* - * DatacentersApplicationloadbalancersGet List Application Load Balancers - * List all Application Load Balancers within the data center. + * 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 @@ -2832,7 +2832,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -2901,8 +2901,8 @@ func (r ApiDatacentersApplicationloadbalancersPatchRequest) Execute() (Applicati } /* - * DatacentersApplicationloadbalancersPatch Partially modify Application Load Balancers - * Update the properties of the specified Application Load Balancer within the data center. + * 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. @@ -3019,7 +3019,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 ApiDatacentersApplicationloadbalancersPostRequest) Execute() (Applicatio } /* - * DatacentersApplicationloadbalancersPost Create Application Load Balancers - * Create an Application Load Balancer within the datacenter. + * 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 @@ -3202,7 +3202,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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 { @@ -3271,8 +3271,8 @@ func (r ApiDatacentersApplicationloadbalancersPutRequest) Execute() (Application } /* - * DatacentersApplicationloadbalancersPut Modify Application Load Balancers - * Modify the properties of the specified Application Load Balancer within the data center. + * 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. @@ -3389,7 +3389,7 @@ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancers 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/vendor/github.com/ionos-cloud/sdk-go/v6/api_backup_units.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_backup_units.go index 91b0b962..8337e9d1 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_backup_units.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_contract_resources.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_contract_resources.go index 29b31390..ef19e758 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_contract_resources.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_data_centers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_data_centers.go index 5303ab6d..33eb5648 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_data_centers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_firewall_rules.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_firewall_rules.go index d6989cde..1e0354a7 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_firewall_rules.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_flow_logs.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_flow_logs.go index e4cf682d..6518b745 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_flow_logs.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_images.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_images.go index 1c291fe3..479f353e 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_images.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_ip_blocks.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_ip_blocks.go index 211cc0b7..f5269e97 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_ip_blocks.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_kubernetes.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_kubernetes.go index c5390dd1..8deae22f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_kubernetes.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_labels.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_labels.go index 37b09b8f..e39480b3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_labels.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_lans.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_lans.go index b443586c..9eeb39d3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_lans.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_load_balancers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_load_balancers.go index 071b148f..bf9142fa 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_load_balancers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_locations.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_locations.go index a1cf93c8..960bbede 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_locations.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_nat_gateways.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_nat_gateways.go index c8cb189f..26550200 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_nat_gateways.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_network_interfaces.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_network_interfaces.go index df5b0937..8ba4b06c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_network_interfaces.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_network_load_balancers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_network_load_balancers.go index f601f147..6e5b317d 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_network_load_balancers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_private_cross_connects.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_private_cross_connects.go index c65d59fb..8f02a097 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_private_cross_connects.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_requests.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_requests.go index 0ae0db6a..42de45c2 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_requests.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_servers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_servers.go index c6db8fba..e3716f10 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_servers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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 { @@ -837,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. @@ -950,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 { @@ -1117,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 { @@ -1196,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 } @@ -1360,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 { @@ -1547,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 { @@ -1615,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 @@ -1730,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 { @@ -1799,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(). @@ -1919,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 { @@ -2094,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 { @@ -2149,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 } @@ -2297,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 { @@ -2361,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. + +Since the suspended instance was not deleted the 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. @@ -2474,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 { @@ -2528,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, @@ -2639,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 { @@ -2693,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. + +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. -This operation is not 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. @@ -2806,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 { @@ -2860,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. -This operation is only supported for the Cubes. +The instance is not deleted and 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. @@ -2973,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 { @@ -3028,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 } @@ -3176,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 { @@ -3240,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, @@ -3353,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 { @@ -3408,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, @@ -3522,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 { @@ -3577,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. @@ -3693,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 { @@ -3768,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 } @@ -3789,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. @@ -3932,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 { @@ -4001,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. @@ -4123,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/vendor/github.com/ionos-cloud/sdk-go/v6/api_snapshots.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_snapshots.go index 57bf0744..1595da3a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_snapshots.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_target_groups.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_target_groups.go index 3b0a554e..6b5bd8fe 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_target_groups.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/api_target_groups.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 ApiTargetGroupsDeleteRequest) Execute() (*APIResponse, error) { } /* - * TargetGroupsDelete Remove target groups - * Remove the specified target group. + * 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 @@ -162,7 +162,7 @@ func (a *TargetGroupsApiService) TargetGroupsDeleteExecute(r ApiTargetGroupsDele 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,8 +215,8 @@ func (r ApiTargetgroupsFindByTargetGroupIdRequest) Execute() (TargetGroup, *APIR } /* - * TargetgroupsFindByTargetGroupId Retrieve target groups - * Retrieve the properties of the specified target group. + * 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 @@ -325,7 +325,7 @@ func (a *TargetGroupsApiService) TargetgroupsFindByTargetGroupIdExecute(r ApiTar 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 ApiTargetgroupsGetRequest) Limit(limit int32) ApiTargetgroupsGetRequest // 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] = []string{value} + r.filters[filterKey] = append(r.filters[filterKey], value) return r } @@ -419,11 +419,13 @@ func (r ApiTargetgroupsGetRequest) Execute() (TargetGroups, *APIResponse, error) } /* - * TargetgroupsGet List target groups - * List all target groups. - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return ApiTargetgroupsGetRequest - */ + - 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, @@ -556,7 +558,7 @@ func (a *TargetGroupsApiService) TargetgroupsGetExecute(r ApiTargetgroupsGetRequ 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 +626,8 @@ func (r ApiTargetgroupsPatchRequest) Execute() (TargetGroup, *APIResponse, error } /* - * TargetgroupsPatch Partially modify target groups - * Update the properties of the specified target group. + * 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 @@ -739,7 +741,7 @@ func (a *TargetGroupsApiService) TargetgroupsPatchExecute(r ApiTargetgroupsPatch 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 +808,8 @@ func (r ApiTargetgroupsPostRequest) Execute() (TargetGroup, *APIResponse, error) } /* - * TargetgroupsPost Create target groups - * Create a target group. + * 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 */ @@ -918,7 +920,7 @@ func (a *TargetGroupsApiService) TargetgroupsPostExecute(r ApiTargetgroupsPostRe 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 +988,8 @@ func (r ApiTargetgroupsPutRequest) Execute() (TargetGroup, *APIResponse, error) } /* - * TargetgroupsPut Modify target groups - * Modify the properties of the specified target group. + * 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 @@ -1101,7 +1103,7 @@ func (a *TargetGroupsApiService) TargetgroupsPutExecute(r ApiTargetgroupsPutRequ 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/vendor/github.com/ionos-cloud/sdk-go/v6/api_templates.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_templates.go index 79f3a2d7..63451fc8 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_templates.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_user_management.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_user_management.go index 4211df53..f27c5a28 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_user_management.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_user_s3_keys.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_user_s3_keys.go index d4a943a5..c8302e01 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_user_s3_keys.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/api_volumes.go b/vendor/github.com/ionos-cloud/sdk-go/v6/api_volumes.go index 5c880373..d7f5e377 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/api_volumes.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/client.go b/vendor/github.com/ionos-cloud/sdk-go/v6/client.go index d8ed59ae..fe8471d9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/client.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/client.go @@ -22,7 +22,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "mime/multipart" "net" "net/http" @@ -53,7 +52,7 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "6.1.3" + Version = "6.1.11" ) // Constants for APIs @@ -370,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: @@ -393,21 +395,32 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duratio } 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 || c.cfg.LogLevel.Satisfies(Debug) { c.cfg.Logger.Printf(" sleeping %s before retrying request\n", t.String()) } - time.Sleep(t) + + if t <= 0 { + return + } + + timer := time.NewTimer(t) + defer timer.Stop() + + select { + case <-ctx.Done(): + case <-timer.C: + } } // Allow modification of underlying config for alternate implementations and testing @@ -430,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"] @@ -636,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 @@ -906,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 @@ -935,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 { @@ -950,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 { @@ -1092,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 diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/configuration.go b/vendor/github.com/ionos-cloud/sdk-go/v6/configuration.go index a50938b2..cb0488ae 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/configuration.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/configuration.go @@ -28,6 +28,7 @@ const ( 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 @@ -130,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.1.3", + UserAgent: "ionos-cloud-sdk-go/v6.1.11", Debug: false, Username: username, Password: password, @@ -140,6 +141,8 @@ func NewConfiguration(username, password, token, hostUrl string) *Configuration WaitTime: defaultWaitTime, Logger: NewDefaultLogger(), LogLevel: getLogLevelFromEnv(), + Host: getHost(hostUrl), + Scheme: getScheme(hostUrl), Servers: ServerConfigurations{ { URL: getServerUrl(hostUrl), @@ -267,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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer.go index 99b2a8f7..61cf5118 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer.go @@ -16,15 +16,15 @@ import ( // 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"` - // 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 *ApplicationLoadBalancerProperties `json:"properties"` - Entities *ApplicationLoadBalancerEntities `json:"entities,omitempty"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewApplicationLoadBalancer instantiates a new ApplicationLoadBalancer object @@ -47,114 +47,114 @@ func NewApplicationLoadBalancerWithDefaults() *ApplicationLoadBalancer { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancer) GetId() *string { +// 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.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 *ApplicationLoadBalancer) GetIdOk() (*string, bool) { +func (o *ApplicationLoadBalancer) GetEntitiesOk() (*ApplicationLoadBalancerEntities, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Entities, true } -// SetId sets field value -func (o *ApplicationLoadBalancer) SetId(v string) { +// SetEntities sets field value +func (o *ApplicationLoadBalancer) SetEntities(v ApplicationLoadBalancerEntities) { - o.Id = &v + o.Entities = &v } -// HasId returns a boolean if a field has been set. -func (o *ApplicationLoadBalancer) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ApplicationLoadBalancer) GetType() *Type { +// 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.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 *ApplicationLoadBalancer) GetTypeOk() (*Type, bool) { +func (o *ApplicationLoadBalancer) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *ApplicationLoadBalancer) SetType(v Type) { +// SetHref sets field value +func (o *ApplicationLoadBalancer) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancer) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancer) GetHref() *string { +// 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.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 *ApplicationLoadBalancer) GetHrefOk() (*string, bool) { +func (o *ApplicationLoadBalancer) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *ApplicationLoadBalancer) SetHref(v string) { +// SetId sets field value +func (o *ApplicationLoadBalancer) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *ApplicationLoadBalancer) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -162,7 +162,7 @@ func (o *ApplicationLoadBalancer) 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 *ApplicationLoadBalancer) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil @@ -200,7 +200,7 @@ func (o *ApplicationLoadBalancer) HasMetadata() bool { } // GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ApplicationLoadBalancerProperties will be returned +// If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetProperties() *ApplicationLoadBalancerProperties { if o == nil { return nil @@ -237,38 +237,38 @@ func (o *ApplicationLoadBalancer) HasProperties() bool { return false } -// GetEntities returns the Entities field value -// If the value is explicit nil, the zero value for ApplicationLoadBalancerEntities will be returned -func (o *ApplicationLoadBalancer) GetEntities() *ApplicationLoadBalancerEntities { +// 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.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 *ApplicationLoadBalancer) GetEntitiesOk() (*ApplicationLoadBalancerEntities, bool) { +func (o *ApplicationLoadBalancer) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Entities, true + return o.Type, true } -// SetEntities sets field value -func (o *ApplicationLoadBalancer) SetEntities(v ApplicationLoadBalancerEntities) { +// SetType sets field value +func (o *ApplicationLoadBalancer) SetType(v Type) { - o.Entities = &v + o.Type = &v } -// HasEntities returns a boolean if a field has been set. -func (o *ApplicationLoadBalancer) HasEntities() bool { - if o != nil && o.Entities != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancer) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -277,24 +277,30 @@ func (o *ApplicationLoadBalancer) HasEntities() bool { func (o ApplicationLoadBalancer) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_entities.go index d8cd1a15..425fceaa 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_entities.go @@ -38,7 +38,7 @@ func NewApplicationLoadBalancerEntitiesWithDefaults() *ApplicationLoadBalancerEn } // GetForwardingrules returns the Forwardingrules field value -// If the value is explicit nil, the zero value for ApplicationLoadBalancerForwardingRules will be returned +// If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerEntities) GetForwardingrules() *ApplicationLoadBalancerForwardingRules { if o == nil { return nil @@ -80,6 +80,7 @@ func (o ApplicationLoadBalancerEntities) MarshalJSON() ([]byte, error) { if o.Forwardingrules != nil { toSerialize["forwardingrules"] = o.Forwardingrules } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule.go index 24fe200e..e9e1bd5c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule.go @@ -16,14 +16,14 @@ import ( // 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"` - // 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 *ApplicationLoadBalancerForwardingRuleProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewApplicationLoadBalancerForwardingRule instantiates a new ApplicationLoadBalancerForwardingRule object @@ -46,190 +46,190 @@ func NewApplicationLoadBalancerForwardingRuleWithDefaults() *ApplicationLoadBala return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRule) GetId() *string { +// 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.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 *ApplicationLoadBalancerForwardingRule) GetIdOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *ApplicationLoadBalancerForwardingRule) SetId(v string) { +// SetHref sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRule) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ApplicationLoadBalancerForwardingRule) GetType() *Type { +// 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.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 *ApplicationLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { +func (o *ApplicationLoadBalancerForwardingRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *ApplicationLoadBalancerForwardingRule) SetType(v Type) { +// SetId sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRule) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRule) GetHref() *string { +// 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.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 *ApplicationLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *ApplicationLoadBalancerForwardingRule) SetHref(v string) { +// SetMetadata sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRule) HasHref() bool { - if o != nil && o.Href != nil { +// 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 } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *ApplicationLoadBalancerForwardingRule) GetMetadata() *DatacenterElementMetadata { +// 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.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 *ApplicationLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *ApplicationLoadBalancerForwardingRule) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *ApplicationLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRule) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// 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 } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ApplicationLoadBalancerForwardingRuleProperties will be returned -func (o *ApplicationLoadBalancerForwardingRule) GetProperties() *ApplicationLoadBalancerForwardingRuleProperties { +// 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.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 *ApplicationLoadBalancerForwardingRule) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { +func (o *ApplicationLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *ApplicationLoadBalancerForwardingRule) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { +// SetType sets field value +func (o *ApplicationLoadBalancerForwardingRule) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRule) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRule) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *ApplicationLoadBalancerForwardingRule) HasProperties() bool { func (o ApplicationLoadBalancerForwardingRule) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_properties.go index 1a0ebe9f..b5adc750 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_properties.go @@ -16,33 +16,33 @@ import ( // 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"` - // Balancing protocol + // The 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"` - // 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"` // Array of items in the collection. ServerCertificates *[]string `json:"serverCertificates,omitempty"` - // An array of items in the collection. The original order of rules is perserved during processing, except for Forward-type rules are processed after the rules with other action defined. The relative order of Forward-type rules is also preserved during the processing. - HttpRules *[]ApplicationLoadBalancerHttpRule `json:"httpRules,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(name string, protocol string, listenerIp string, listenerPort int32) *ApplicationLoadBalancerForwardingRuleProperties { +func NewApplicationLoadBalancerForwardingRuleProperties(listenerIp string, listenerPort int32, name string, protocol string) *ApplicationLoadBalancerForwardingRuleProperties { this := ApplicationLoadBalancerForwardingRuleProperties{} - this.Name = &name - this.Protocol = &protocol this.ListenerIp = &listenerIp this.ListenerPort = &listenerPort + this.Name = &name + this.Protocol = &protocol return &this } @@ -55,76 +55,76 @@ func NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults() *Applicati return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRuleProperties) GetName() *string { +// 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.Name + return o.ClientTimeout } -// GetNameOk returns a tuple with the Name field value +// 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) GetNameOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeoutOk() (*int32, bool) { if o == nil { return nil, false } - return o.Name, true + return o.ClientTimeout, true } -// SetName sets field value -func (o *ApplicationLoadBalancerForwardingRuleProperties) SetName(v string) { +// SetClientTimeout sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetClientTimeout(v int32) { - o.Name = &v + o.ClientTimeout = &v } -// HasName returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRuleProperties) HasName() bool { - if o != nil && o.Name != nil { +// 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 } -// GetProtocol returns the Protocol field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocol() *string { +// 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.Protocol + return o.HttpRules } -// GetProtocolOk returns a tuple with the Protocol field value +// 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) GetProtocolOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRulesOk() (*[]ApplicationLoadBalancerHttpRule, bool) { if o == nil { return nil, false } - return o.Protocol, true + return o.HttpRules, true } -// SetProtocol sets field value -func (o *ApplicationLoadBalancerForwardingRuleProperties) SetProtocol(v string) { +// SetHttpRules sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetHttpRules(v []ApplicationLoadBalancerHttpRule) { - o.Protocol = &v + o.HttpRules = &v } -// HasProtocol returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRuleProperties) HasProtocol() bool { - if o != nil && o.Protocol != nil { +// HasHttpRules returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasHttpRules() bool { + if o != nil && o.HttpRules != nil { return true } @@ -132,7 +132,7 @@ func (o *ApplicationLoadBalancerForwardingRuleProperties) 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 *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIp() *string { if o == nil { return nil @@ -170,7 +170,7 @@ func (o *ApplicationLoadBalancerForwardingRuleProperties) 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 *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPort() *int32 { if o == nil { return nil @@ -207,114 +207,114 @@ func (o *ApplicationLoadBalancerForwardingRuleProperties) HasListenerPort() bool return false } -// GetClientTimeout returns the ClientTimeout field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeout() *int32 { +// 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.ClientTimeout + return o.Name } -// GetClientTimeoutOk returns a tuple with the ClientTimeout 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 *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeoutOk() (*int32, bool) { +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.ClientTimeout, true + return o.Name, true } -// SetClientTimeout sets field value -func (o *ApplicationLoadBalancerForwardingRuleProperties) SetClientTimeout(v int32) { +// SetName sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetName(v string) { - o.ClientTimeout = &v + o.Name = &v } -// HasClientTimeout returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRuleProperties) HasClientTimeout() bool { - if o != nil && o.ClientTimeout != nil { +// 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 } -// GetServerCertificates returns the ServerCertificates field value -// If the value is explicit nil, the zero value for []string will be returned -func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificates() *[]string { +// 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.ServerCertificates + return o.Protocol } -// GetServerCertificatesOk returns a tuple with the ServerCertificates 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 *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificatesOk() (*[]string, bool) { +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } - return o.ServerCertificates, true + return o.Protocol, true } -// SetServerCertificates sets field value -func (o *ApplicationLoadBalancerForwardingRuleProperties) SetServerCertificates(v []string) { +// SetProtocol sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetProtocol(v string) { - o.ServerCertificates = &v + o.Protocol = &v } -// HasServerCertificates returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRuleProperties) HasServerCertificates() bool { - if o != nil && o.ServerCertificates != nil { +// 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 } -// GetHttpRules returns the HttpRules field value -// If the value is explicit nil, the zero value for []ApplicationLoadBalancerHttpRule will be returned -func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRules() *[]ApplicationLoadBalancerHttpRule { +// 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.HttpRules + return o.ServerCertificates } -// GetHttpRulesOk returns a tuple with the HttpRules field value +// 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) GetHttpRulesOk() (*[]ApplicationLoadBalancerHttpRule, bool) { +func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificatesOk() (*[]string, bool) { if o == nil { return nil, false } - return o.HttpRules, true + return o.ServerCertificates, true } -// SetHttpRules sets field value -func (o *ApplicationLoadBalancerForwardingRuleProperties) SetHttpRules(v []ApplicationLoadBalancerHttpRule) { +// SetServerCertificates sets field value +func (o *ApplicationLoadBalancerForwardingRuleProperties) SetServerCertificates(v []string) { - o.HttpRules = &v + o.ServerCertificates = &v } -// HasHttpRules returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRuleProperties) HasHttpRules() bool { - if o != nil && o.HttpRules != nil { +// HasServerCertificates returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRuleProperties) HasServerCertificates() bool { + if o != nil && o.ServerCertificates != nil { return true } @@ -323,27 +323,34 @@ func (o *ApplicationLoadBalancerForwardingRuleProperties) HasHttpRules() bool { func (o ApplicationLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.ClientTimeout != nil { + toSerialize["clientTimeout"] = o.ClientTimeout } - if o.Protocol != nil { - toSerialize["protocol"] = o.Protocol + + 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.ClientTimeout != nil { - toSerialize["clientTimeout"] = o.ClientTimeout + + if o.Name != nil { + toSerialize["name"] = o.Name } + + if o.Protocol != nil { + toSerialize["protocol"] = o.Protocol + } + if o.ServerCertificates != nil { toSerialize["serverCertificates"] = o.ServerCertificates } - if o.HttpRules != nil { - toSerialize["httpRules"] = o.HttpRules - } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_put.go index fead7a0e..d5e6f649 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rule_put.go @@ -16,13 +16,13 @@ import ( // 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"` + Id *string `json:"id,omitempty"` + Properties *ApplicationLoadBalancerForwardingRuleProperties `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 *ApplicationLoadBalancerForwardingRuleProperties `json:"properties"` } // NewApplicationLoadBalancerForwardingRulePut instantiates a new ApplicationLoadBalancerForwardingRulePut object @@ -45,152 +45,152 @@ func NewApplicationLoadBalancerForwardingRulePutWithDefaults() *ApplicationLoadB return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRulePut) GetId() *string { +// 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.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 *ApplicationLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *ApplicationLoadBalancerForwardingRulePut) SetId(v string) { +// SetHref sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRulePut) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ApplicationLoadBalancerForwardingRulePut) GetType() *Type { +// 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.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 *ApplicationLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { +func (o *ApplicationLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *ApplicationLoadBalancerForwardingRulePut) SetType(v Type) { +// SetId sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRulePut) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRulePut) GetHref() *string { +// 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.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 *ApplicationLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRulePut) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *ApplicationLoadBalancerForwardingRulePut) SetHref(v string) { +// SetProperties sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRulePut) HasHref() bool { - if o != nil && o.Href != nil { +// 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 } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ApplicationLoadBalancerForwardingRuleProperties will be returned -func (o *ApplicationLoadBalancerForwardingRulePut) GetProperties() *ApplicationLoadBalancerForwardingRuleProperties { +// 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.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 *ApplicationLoadBalancerForwardingRulePut) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { +func (o *ApplicationLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *ApplicationLoadBalancerForwardingRulePut) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { +// SetType sets field value +func (o *ApplicationLoadBalancerForwardingRulePut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRulePut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRulePut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *ApplicationLoadBalancerForwardingRulePut) HasProperties() bool { func (o ApplicationLoadBalancerForwardingRulePut) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rules.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rules.go index c5fe1984..aae71997 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rules.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_forwarding_rules.go @@ -16,19 +16,19 @@ import ( // 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"` - // 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 *[]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 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"` } // NewApplicationLoadBalancerForwardingRules instantiates a new ApplicationLoadBalancerForwardingRules object @@ -49,114 +49,114 @@ func NewApplicationLoadBalancerForwardingRulesWithDefaults() *ApplicationLoadBal return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRules) GetId() *string { +// 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.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 *ApplicationLoadBalancerForwardingRules) GetIdOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *ApplicationLoadBalancerForwardingRules) SetId(v string) { +// SetLinks sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRules) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ApplicationLoadBalancerForwardingRules) GetType() *Type { +// 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.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 *ApplicationLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { +func (o *ApplicationLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *ApplicationLoadBalancerForwardingRules) SetType(v Type) { +// SetHref sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRules) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerForwardingRules) GetHref() *string { +// 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.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 *ApplicationLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { +func (o *ApplicationLoadBalancerForwardingRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *ApplicationLoadBalancerForwardingRules) SetHref(v string) { +// SetId sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRules) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *ApplicationLoadBalancerForwardingRules) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []ApplicationLoadBalancerForwardingRule will be returned +// If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetItems() *[]ApplicationLoadBalancerForwardingRule { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *ApplicationLoadBalancerForwardingRules) 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 *ApplicationLoadBalancerForwardingRules) GetOffset() *float32 { +// 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.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 *ApplicationLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { +func (o *ApplicationLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *ApplicationLoadBalancerForwardingRules) SetOffset(v float32) { +// SetLimit sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRules) HasOffset() bool { - if o != nil && o.Offset != nil { +// 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 } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *ApplicationLoadBalancerForwardingRules) GetLimit() *float32 { +// 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.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 *ApplicationLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { +func (o *ApplicationLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *ApplicationLoadBalancerForwardingRules) SetLimit(v float32) { +// SetOffset sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRules) HasLimit() bool { - if o != nil && o.Limit != nil { +// 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 } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *ApplicationLoadBalancerForwardingRules) GetLinks() *PaginationLinks { +// 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.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 *ApplicationLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { +func (o *ApplicationLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *ApplicationLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *ApplicationLoadBalancerForwardingRules) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerForwardingRules) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerForwardingRules) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *ApplicationLoadBalancerForwardingRules) HasLinks() bool { func (o ApplicationLoadBalancerForwardingRules) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule.go index 44af9bda..1d52893f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule.go @@ -16,24 +16,24 @@ import ( // ApplicationLoadBalancerHttpRule struct for ApplicationLoadBalancerHttpRule type ApplicationLoadBalancerHttpRule struct { - // The unique name of the Application Load Balancer HTTP rule. - Name *string `json:"name"` - // Type of the HTTP rule. - Type *string `json:"type"` - // The ID of the target group; mandatory and only valid for FORWARD actions. - TargetGroup *string `json:"targetGroup,omitempty"` - // Default is false; valid only for REDIRECT actions. + // 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 redirecting; mandatory and valid only for REDIRECT actions. + // The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. Location *string `json:"location,omitempty"` - // Valid only for REDIRECT and STATIC actions. For REDIRECT actions, default is 301 and possible values are 301, 302, 303, 307, and 308. For STATIC actions, default is 503 and valid range is 200 to 599. - StatusCode *int32 `json:"statusCode,omitempty"` - // The response message of the request; mandatory for STATIC actions. + // 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"` - // Valid only for STATIC actions. - ContentType *string `json:"contentType,omitempty"` - // An array of items in the collection.The action is only performed if each and every condition is met; if no conditions are set, the rule will always be performed. - Conditions *[]ApplicationLoadBalancerHttpRuleCondition `json:"conditions,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 @@ -57,114 +57,76 @@ func NewApplicationLoadBalancerHttpRuleWithDefaults() *ApplicationLoadBalancerHt return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be 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 -} - -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerHttpRule) GetType() *string { +// 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.Type + return o.Conditions } -// GetTypeOk returns a tuple with the Type field value +// 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) GetTypeOk() (*string, bool) { +func (o *ApplicationLoadBalancerHttpRule) GetConditionsOk() (*[]ApplicationLoadBalancerHttpRuleCondition, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Conditions, true } -// SetType sets field value -func (o *ApplicationLoadBalancerHttpRule) SetType(v string) { +// SetConditions sets field value +func (o *ApplicationLoadBalancerHttpRule) SetConditions(v []ApplicationLoadBalancerHttpRuleCondition) { - o.Type = &v + o.Conditions = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRule) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetTargetGroup returns the TargetGroup field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerHttpRule) GetTargetGroup() *string { +// 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.TargetGroup + return o.ContentType } -// GetTargetGroupOk returns a tuple with the TargetGroup field value +// 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) GetTargetGroupOk() (*string, bool) { +func (o *ApplicationLoadBalancerHttpRule) GetContentTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.TargetGroup, true + return o.ContentType, true } -// SetTargetGroup sets field value -func (o *ApplicationLoadBalancerHttpRule) SetTargetGroup(v string) { +// SetContentType sets field value +func (o *ApplicationLoadBalancerHttpRule) SetContentType(v string) { - o.TargetGroup = &v + o.ContentType = &v } -// HasTargetGroup returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRule) HasTargetGroup() bool { - if o != nil && o.TargetGroup != nil { +// HasContentType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasContentType() bool { + if o != nil && o.ContentType != nil { return true } @@ -172,7 +134,7 @@ func (o *ApplicationLoadBalancerHttpRule) HasTargetGroup() bool { } // GetDropQuery returns the DropQuery 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 *ApplicationLoadBalancerHttpRule) GetDropQuery() *bool { if o == nil { return nil @@ -210,7 +172,7 @@ func (o *ApplicationLoadBalancerHttpRule) HasDropQuery() bool { } // GetLocation returns the Location 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 *ApplicationLoadBalancerHttpRule) GetLocation() *string { if o == nil { return nil @@ -247,38 +209,38 @@ func (o *ApplicationLoadBalancerHttpRule) HasLocation() bool { return false } -// GetStatusCode returns the StatusCode field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *ApplicationLoadBalancerHttpRule) GetStatusCode() *int32 { +// 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.StatusCode + return o.Name } -// GetStatusCodeOk returns a tuple with the StatusCode 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 *ApplicationLoadBalancerHttpRule) GetStatusCodeOk() (*int32, bool) { +func (o *ApplicationLoadBalancerHttpRule) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.StatusCode, true + return o.Name, true } -// SetStatusCode sets field value -func (o *ApplicationLoadBalancerHttpRule) SetStatusCode(v int32) { +// SetName sets field value +func (o *ApplicationLoadBalancerHttpRule) SetName(v string) { - o.StatusCode = &v + o.Name = &v } -// HasStatusCode returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRule) HasStatusCode() bool { - if o != nil && o.StatusCode != nil { +// HasName returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRule) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -286,7 +248,7 @@ func (o *ApplicationLoadBalancerHttpRule) HasStatusCode() bool { } // GetResponseMessage returns the ResponseMessage 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 *ApplicationLoadBalancerHttpRule) GetResponseMessage() *string { if o == nil { return nil @@ -323,76 +285,114 @@ func (o *ApplicationLoadBalancerHttpRule) HasResponseMessage() bool { return false } -// GetContentType returns the ContentType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerHttpRule) GetContentType() *string { +// 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.ContentType + return o.StatusCode } -// GetContentTypeOk returns a tuple with the ContentType field value +// 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) GetContentTypeOk() (*string, bool) { +func (o *ApplicationLoadBalancerHttpRule) GetStatusCodeOk() (*int32, bool) { if o == nil { return nil, false } - return o.ContentType, true + return o.StatusCode, true } -// SetContentType sets field value -func (o *ApplicationLoadBalancerHttpRule) SetContentType(v string) { +// SetStatusCode sets field value +func (o *ApplicationLoadBalancerHttpRule) SetStatusCode(v int32) { - o.ContentType = &v + o.StatusCode = &v } -// HasContentType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRule) HasContentType() bool { - if o != nil && o.ContentType != nil { +// 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 } -// GetConditions returns the Conditions field value -// If the value is explicit nil, the zero value for []ApplicationLoadBalancerHttpRuleCondition will be returned -func (o *ApplicationLoadBalancerHttpRule) GetConditions() *[]ApplicationLoadBalancerHttpRuleCondition { +// 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.Conditions + return o.TargetGroup } -// GetConditionsOk returns a tuple with the Conditions field value +// 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) GetConditionsOk() (*[]ApplicationLoadBalancerHttpRuleCondition, bool) { +func (o *ApplicationLoadBalancerHttpRule) GetTargetGroupOk() (*string, bool) { if o == nil { return nil, false } - return o.Conditions, true + return o.TargetGroup, true } -// SetConditions sets field value -func (o *ApplicationLoadBalancerHttpRule) SetConditions(v []ApplicationLoadBalancerHttpRuleCondition) { +// SetTargetGroup sets field value +func (o *ApplicationLoadBalancerHttpRule) SetTargetGroup(v string) { - o.Conditions = &v + o.TargetGroup = &v } -// HasConditions returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRule) HasConditions() bool { - if o != nil && o.Conditions != nil { +// 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 } @@ -401,33 +401,42 @@ func (o *ApplicationLoadBalancerHttpRule) HasConditions() bool { func (o ApplicationLoadBalancerHttpRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.Conditions != nil { + toSerialize["conditions"] = o.Conditions } - if o.TargetGroup != nil { - toSerialize["targetGroup"] = o.TargetGroup + + 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.StatusCode != nil { - toSerialize["statusCode"] = o.StatusCode + + if o.Name != nil { + toSerialize["name"] = o.Name } + if o.ResponseMessage != nil { toSerialize["responseMessage"] = o.ResponseMessage } - if o.ContentType != nil { - toSerialize["contentType"] = o.ContentType + + if o.StatusCode != nil { + toSerialize["statusCode"] = o.StatusCode } - if o.Conditions != nil { - toSerialize["conditions"] = o.Conditions + + if o.TargetGroup != nil { + toSerialize["targetGroup"] = o.TargetGroup } + + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule_condition.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule_condition.go index a53b7679..a2b12adf 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule_condition.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_http_rule_condition.go @@ -16,15 +16,15 @@ import ( // ApplicationLoadBalancerHttpRuleCondition struct for ApplicationLoadBalancerHttpRuleCondition type ApplicationLoadBalancerHttpRuleCondition struct { - // Type of the HTTP rule condition. - Type *string `json:"type"` - // Matching rule for the HTTP rule condition attribute; mandatory for HEADER, PATH, QUERY, METHOD, HOST, and COOKIE types; must be null when type is SOURCE_IP. + // 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"` - // Specifies whether the condition is negated or not; the default is False. - Negate *bool `json:"negate,omitempty"` - // Must be null when type is PATH, METHOD, HOST, or SOURCE_IP. Key can only be set when type is COOKIES, HEADER, or QUERY. + // 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"` - // Mandatory for conditions CONTAINS, EQUALS, MATCHES, STARTS_WITH, ENDS_WITH; must be null when condition is EXISTS; should be a valid CIDR if provided and if type is SOURCE_IP. + // 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"` } @@ -32,11 +32,11 @@ type ApplicationLoadBalancerHttpRuleCondition 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 NewApplicationLoadBalancerHttpRuleCondition(type_ string, condition string) *ApplicationLoadBalancerHttpRuleCondition { +func NewApplicationLoadBalancerHttpRuleCondition(condition string, type_ string) *ApplicationLoadBalancerHttpRuleCondition { this := ApplicationLoadBalancerHttpRuleCondition{} - this.Type = &type_ this.Condition = &condition + this.Type = &type_ return &this } @@ -49,76 +49,76 @@ func NewApplicationLoadBalancerHttpRuleConditionWithDefaults() *ApplicationLoadB return &this } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerHttpRuleCondition) GetType() *string { +// 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.Type + return o.Condition } -// GetTypeOk returns a tuple with the Type field value +// 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) GetTypeOk() (*string, bool) { +func (o *ApplicationLoadBalancerHttpRuleCondition) GetConditionOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Condition, true } -// SetType sets field value -func (o *ApplicationLoadBalancerHttpRuleCondition) SetType(v string) { +// SetCondition sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetCondition(v string) { - o.Type = &v + o.Condition = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRuleCondition) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetCondition returns the Condition field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerHttpRuleCondition) GetCondition() *string { +// 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.Condition + return o.Key } -// GetConditionOk returns a tuple with the Condition field value +// 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) GetConditionOk() (*string, bool) { +func (o *ApplicationLoadBalancerHttpRuleCondition) GetKeyOk() (*string, bool) { if o == nil { return nil, false } - return o.Condition, true + return o.Key, true } -// SetCondition sets field value -func (o *ApplicationLoadBalancerHttpRuleCondition) SetCondition(v string) { +// SetKey sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetKey(v string) { - o.Condition = &v + o.Key = &v } -// HasCondition returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRuleCondition) HasCondition() bool { - if o != nil && o.Condition != nil { +// HasKey returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasKey() bool { + if o != nil && o.Key != nil { return true } @@ -126,7 +126,7 @@ func (o *ApplicationLoadBalancerHttpRuleCondition) HasCondition() bool { } // GetNegate returns the Negate 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 *ApplicationLoadBalancerHttpRuleCondition) GetNegate() *bool { if o == nil { return nil @@ -163,38 +163,38 @@ func (o *ApplicationLoadBalancerHttpRuleCondition) HasNegate() bool { return false } -// GetKey returns the Key field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerHttpRuleCondition) GetKey() *string { +// 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.Key + return o.Type } -// GetKeyOk returns a tuple with the Key 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 *ApplicationLoadBalancerHttpRuleCondition) GetKeyOk() (*string, bool) { +func (o *ApplicationLoadBalancerHttpRuleCondition) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Key, true + return o.Type, true } -// SetKey sets field value -func (o *ApplicationLoadBalancerHttpRuleCondition) SetKey(v string) { +// SetType sets field value +func (o *ApplicationLoadBalancerHttpRuleCondition) SetType(v string) { - o.Key = &v + o.Type = &v } -// HasKey returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerHttpRuleCondition) HasKey() bool { - if o != nil && o.Key != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerHttpRuleCondition) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -202,7 +202,7 @@ func (o *ApplicationLoadBalancerHttpRuleCondition) 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 *ApplicationLoadBalancerHttpRuleCondition) GetValue() *string { if o == nil { return nil @@ -241,21 +241,26 @@ func (o *ApplicationLoadBalancerHttpRuleCondition) HasValue() bool { func (o ApplicationLoadBalancerHttpRuleCondition) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Type != nil { - toSerialize["type"] = o.Type - } 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.Key != nil { - toSerialize["key"] = o.Key + + if o.Type != nil { + toSerialize["type"] = o.Type } + if o.Value != nil { toSerialize["value"] = o.Value } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_properties.go index 81a42ed9..8c62ecc1 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_properties.go @@ -16,27 +16,27 @@ import ( // ApplicationLoadBalancerProperties struct for ApplicationLoadBalancerProperties type ApplicationLoadBalancerProperties struct { - // The name of the Application Load Balancer. - Name *string `json:"name"` - // ID of the listening (inbound) LAN. - ListenerLan *int32 `json:"listenerLan"` - // 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. + // 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"` - // ID of the balanced private target LAN (outbound). - TargetLan *int32 `json:"targetLan"` // 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(name string, listenerLan int32, targetLan int32) *ApplicationLoadBalancerProperties { +func NewApplicationLoadBalancerProperties(listenerLan int32, name string, targetLan int32) *ApplicationLoadBalancerProperties { this := ApplicationLoadBalancerProperties{} - this.Name = &name this.ListenerLan = &listenerLan + this.Name = &name this.TargetLan = &targetLan return &this @@ -50,38 +50,76 @@ func NewApplicationLoadBalancerPropertiesWithDefaults() *ApplicationLoadBalancer return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerProperties) GetName() *string { +// 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.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 *ApplicationLoadBalancerProperties) GetNameOk() (*string, bool) { +func (o *ApplicationLoadBalancerProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Ips, true } -// SetName sets field value -func (o *ApplicationLoadBalancerProperties) SetName(v string) { +// SetIps sets field value +func (o *ApplicationLoadBalancerProperties) SetIps(v []string) { - o.Name = &v + o.Ips = &v } -// HasName returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerProperties) HasName() bool { - if o != nil && o.Name != nil { +// 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 } @@ -89,7 +127,7 @@ func (o *ApplicationLoadBalancerProperties) 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 *ApplicationLoadBalancerProperties) GetListenerLan() *int32 { if o == nil { return nil @@ -126,38 +164,38 @@ func (o *ApplicationLoadBalancerProperties) 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 *ApplicationLoadBalancerProperties) GetIps() *[]string { +// 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.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 *ApplicationLoadBalancerProperties) GetIpsOk() (*[]string, bool) { +func (o *ApplicationLoadBalancerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Ips, true + return o.Name, true } -// SetIps sets field value -func (o *ApplicationLoadBalancerProperties) SetIps(v []string) { +// SetName sets field value +func (o *ApplicationLoadBalancerProperties) SetName(v string) { - o.Ips = &v + o.Name = &v } -// HasIps returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerProperties) HasIps() bool { - if o != nil && o.Ips != nil { +// HasName returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerProperties) HasName() bool { + if o != nil && o.Name != nil { return true } @@ -165,7 +203,7 @@ func (o *ApplicationLoadBalancerProperties) 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 *ApplicationLoadBalancerProperties) GetTargetLan() *int32 { if o == nil { return nil @@ -202,61 +240,28 @@ func (o *ApplicationLoadBalancerProperties) 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 *ApplicationLoadBalancerProperties) GetLbPrivateIps() *[]string { - if o == nil { - return nil +func (o ApplicationLoadBalancerProperties) 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 *ApplicationLoadBalancerProperties) 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 *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 + if o.ListenerLan != nil { + toSerialize["listenerLan"] = o.ListenerLan } - return false -} - -func (o ApplicationLoadBalancerProperties) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_put.go index 5889ad96..79a5fa1c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancer_put.go @@ -16,13 +16,13 @@ import ( // 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"` + Id *string `json:"id,omitempty"` + Properties *ApplicationLoadBalancerProperties `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 *ApplicationLoadBalancerProperties `json:"properties"` } // NewApplicationLoadBalancerPut instantiates a new ApplicationLoadBalancerPut object @@ -45,152 +45,152 @@ func NewApplicationLoadBalancerPutWithDefaults() *ApplicationLoadBalancerPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerPut) GetId() *string { +// 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.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 *ApplicationLoadBalancerPut) GetIdOk() (*string, bool) { +func (o *ApplicationLoadBalancerPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *ApplicationLoadBalancerPut) SetId(v string) { +// SetHref sets field value +func (o *ApplicationLoadBalancerPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerPut) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ApplicationLoadBalancerPut) GetType() *Type { +// 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.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 *ApplicationLoadBalancerPut) GetTypeOk() (*Type, bool) { +func (o *ApplicationLoadBalancerPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *ApplicationLoadBalancerPut) SetType(v Type) { +// SetId sets field value +func (o *ApplicationLoadBalancerPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerPut) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancerPut) GetHref() *string { +// 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.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 *ApplicationLoadBalancerPut) GetHrefOk() (*string, bool) { +func (o *ApplicationLoadBalancerPut) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *ApplicationLoadBalancerPut) SetHref(v string) { +// SetProperties sets field value +func (o *ApplicationLoadBalancerPut) SetProperties(v ApplicationLoadBalancerProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerPut) HasHref() bool { - if o != nil && o.Href != nil { +// 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 } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for ApplicationLoadBalancerProperties will be returned -func (o *ApplicationLoadBalancerPut) GetProperties() *ApplicationLoadBalancerProperties { +// 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.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 *ApplicationLoadBalancerPut) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool) { +func (o *ApplicationLoadBalancerPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *ApplicationLoadBalancerPut) SetProperties(v ApplicationLoadBalancerProperties) { +// SetType sets field value +func (o *ApplicationLoadBalancerPut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *ApplicationLoadBalancerPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancerPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *ApplicationLoadBalancerPut) HasProperties() bool { func (o ApplicationLoadBalancerPut) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancers.go index 41219e16..a2f3a9e0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_application_load_balancers.go @@ -16,19 +16,19 @@ import ( // 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"` - // 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 *[]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 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"` } // NewApplicationLoadBalancers instantiates a new ApplicationLoadBalancers object @@ -49,114 +49,114 @@ func NewApplicationLoadBalancersWithDefaults() *ApplicationLoadBalancers { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancers) GetId() *string { +// 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.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 *ApplicationLoadBalancers) GetIdOk() (*string, bool) { +func (o *ApplicationLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *ApplicationLoadBalancers) SetId(v string) { +// SetLinks sets field value +func (o *ApplicationLoadBalancers) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *ApplicationLoadBalancers) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *ApplicationLoadBalancers) GetType() *Type { +// 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.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 *ApplicationLoadBalancers) GetTypeOk() (*Type, bool) { +func (o *ApplicationLoadBalancers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *ApplicationLoadBalancers) SetType(v Type) { +// SetHref sets field value +func (o *ApplicationLoadBalancers) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *ApplicationLoadBalancers) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *ApplicationLoadBalancers) GetHref() *string { +// 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.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 *ApplicationLoadBalancers) GetHrefOk() (*string, bool) { +func (o *ApplicationLoadBalancers) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *ApplicationLoadBalancers) SetHref(v string) { +// SetId sets field value +func (o *ApplicationLoadBalancers) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *ApplicationLoadBalancers) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *ApplicationLoadBalancers) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []ApplicationLoadBalancer will be returned +// If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetItems() *[]ApplicationLoadBalancer { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *ApplicationLoadBalancers) 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 *ApplicationLoadBalancers) GetOffset() *float32 { +// 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.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 *ApplicationLoadBalancers) GetOffsetOk() (*float32, bool) { +func (o *ApplicationLoadBalancers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *ApplicationLoadBalancers) SetOffset(v float32) { +// SetLimit sets field value +func (o *ApplicationLoadBalancers) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *ApplicationLoadBalancers) HasOffset() bool { - if o != nil && o.Offset != nil { +// 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 } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *ApplicationLoadBalancers) GetLimit() *float32 { +// 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.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 *ApplicationLoadBalancers) GetLimitOk() (*float32, bool) { +func (o *ApplicationLoadBalancers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *ApplicationLoadBalancers) SetLimit(v float32) { +// SetOffset sets field value +func (o *ApplicationLoadBalancers) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *ApplicationLoadBalancers) HasLimit() bool { - if o != nil && o.Limit != nil { +// 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 } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *ApplicationLoadBalancers) GetLinks() *PaginationLinks { +// 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.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 *ApplicationLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { +func (o *ApplicationLoadBalancers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *ApplicationLoadBalancers) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *ApplicationLoadBalancers) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *ApplicationLoadBalancers) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *ApplicationLoadBalancers) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *ApplicationLoadBalancers) HasLinks() bool { func (o ApplicationLoadBalancers) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_attached_volumes.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_attached_volumes.go index ed03aea6..fdd81e42 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_attached_volumes.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit.go index bc9197db..6f1ff7c4 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit_properties.go index 45b5584e..64698d35 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit_sso.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit_sso.go index f493bf95..ea6ba415 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_unit_sso.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_units.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_units.go index 6023f94e..280d50c6 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_backup_units.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_balanced_nics.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_balanced_nics.go index feef17f6..f9338b57 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_balanced_nics.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_cdroms.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_cdroms.go index 4d2bb9a8..86289fa1 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_cdroms.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_connectable_datacenter.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_connectable_datacenter.go index 6b8a5f4c..778a5bdd 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_connectable_datacenter.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_contract.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_contract.go index e1e05792..d3ce413e 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_contract.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_contract_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_contract_properties.go index a888e074..a579ea3b 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_contract_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_contracts.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_contracts.go index 5695f722..61e2f9aa 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_contracts.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_cpu_architecture_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_cpu_architecture_properties.go index 80c6b6c2..c86a3899 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_cpu_architecture_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_data_center_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_data_center_entities.go index 65fa3ee3..2ac821f8 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_data_center_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter.go index 45a4e9d7..9b53f656 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter_element_metadata.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter_element_metadata.go index 6f504314..d0d262ff 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter_element_metadata.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter_properties.go index 7ea45724..454fd496 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenter_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenters.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenters.go index 28911601..43c00c3c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_datacenters.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_error.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_error.go index a383952b..d5e52dd3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_error.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_error_message.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_error_message.go index f3044d97..d567be37 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_error_message.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewall_rule.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewall_rule.go index 6b472e4e..88f0f5ea 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewall_rule.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewall_rules.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewall_rules.go index f3b57293..5701dda1 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewall_rules.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewallrule_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewallrule_properties.go index 188c3e7f..0e5de49b 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_firewallrule_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log.go index ca6a5435..6e441240 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log_properties.go index 7d3df9fa..0f2a3b20 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log_put.go index 8f9b7f77..7fe84d71 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_log_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_logs.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_logs.go index 6ecbeac2..653d925a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_flow_logs.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group.go index a1e9b678..1509dd46 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_entities.go index 067e84ca..f9e91462 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_members.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_members.go index c38d7c01..a4a750e7 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_members.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_properties.go index f075b0bb..d73cb668 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_properties.go @@ -16,34 +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 @@ -64,582 +70,722 @@ 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 } -// GetCreateDataCenter returns the CreateDataCenter field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreateDataCenter() *bool { +// 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.CreateDataCenter + return o.AccessAndManageCertificates } -// GetCreateDataCenterOk returns a tuple with the CreateDataCenter field value +// 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) GetCreateDataCenterOk() (*bool, bool) { +func (o *GroupProperties) GetAccessAndManageCertificatesOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateDataCenter, true + return o.AccessAndManageCertificates, true } -// SetCreateDataCenter sets field value -func (o *GroupProperties) SetCreateDataCenter(v bool) { +// SetAccessAndManageCertificates sets field value +func (o *GroupProperties) SetAccessAndManageCertificates(v bool) { - o.CreateDataCenter = &v + o.AccessAndManageCertificates = &v } -// HasCreateDataCenter returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateDataCenter() bool { - if o != nil && o.CreateDataCenter != nil { +// 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 } -// 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 { +// 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.CreateSnapshot + return o.AccessAndManageDns } -// GetCreateSnapshotOk returns a tuple with the CreateSnapshot field value +// 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) GetCreateSnapshotOk() (*bool, bool) { +func (o *GroupProperties) GetAccessAndManageDnsOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateSnapshot, true + return o.AccessAndManageDns, true } -// SetCreateSnapshot sets field value -func (o *GroupProperties) SetCreateSnapshot(v bool) { +// SetAccessAndManageDns sets field value +func (o *GroupProperties) SetAccessAndManageDns(v bool) { - o.CreateSnapshot = &v + o.AccessAndManageDns = &v } -// HasCreateSnapshot returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateSnapshot() bool { - if o != nil && o.CreateSnapshot != nil { +// 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 } -// 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 { +// 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.ReserveIp + return o.AccessAndManageMonitoring } -// GetReserveIpOk returns a tuple with the ReserveIp field value +// 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) GetReserveIpOk() (*bool, bool) { +func (o *GroupProperties) GetAccessAndManageMonitoringOk() (*bool, bool) { if o == nil { return nil, false } - return o.ReserveIp, true + return o.AccessAndManageMonitoring, true } -// SetReserveIp sets field value -func (o *GroupProperties) SetReserveIp(v bool) { +// SetAccessAndManageMonitoring sets field value +func (o *GroupProperties) SetAccessAndManageMonitoring(v bool) { - o.ReserveIp = &v + o.AccessAndManageMonitoring = &v } -// HasReserveIp returns a boolean if a field has been set. -func (o *GroupProperties) HasReserveIp() bool { - if o != nil && o.ReserveIp != nil { +// 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 } -// 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 { +// 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.AccessActivityLog + return o.CreateBackupUnit } -// GetAccessActivityLogOk returns a tuple with the AccessActivityLog field value +// 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) GetAccessActivityLogOk() (*bool, bool) { +func (o *GroupProperties) GetCreateBackupUnitOk() (*bool, bool) { if o == nil { return nil, false } - return o.AccessActivityLog, true + return o.CreateBackupUnit, true } -// SetAccessActivityLog sets field value -func (o *GroupProperties) SetAccessActivityLog(v bool) { +// SetCreateBackupUnit sets field value +func (o *GroupProperties) SetCreateBackupUnit(v bool) { - o.AccessActivityLog = &v + o.CreateBackupUnit = &v } -// HasAccessActivityLog returns a boolean if a field has been set. -func (o *GroupProperties) HasAccessActivityLog() bool { - if o != nil && o.AccessActivityLog != nil { +// HasCreateBackupUnit returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateBackupUnit() bool { + if o != nil && o.CreateBackupUnit != nil { return true } return false } -// GetCreatePcc returns the CreatePcc field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetCreatePcc() *bool { +// GetCreateDataCenter returns the CreateDataCenter field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreateDataCenter() *bool { if o == nil { return nil } - return o.CreatePcc + return o.CreateDataCenter } -// GetCreatePccOk returns a tuple with the CreatePcc field value +// GetCreateDataCenterOk returns a tuple with the CreateDataCenter field value // and a 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) GetCreatePccOk() (*bool, bool) { +func (o *GroupProperties) GetCreateDataCenterOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreatePcc, true + return o.CreateDataCenter, true } -// SetCreatePcc sets field value -func (o *GroupProperties) SetCreatePcc(v bool) { +// SetCreateDataCenter sets field value +func (o *GroupProperties) SetCreateDataCenter(v bool) { - o.CreatePcc = &v + o.CreateDataCenter = &v } -// HasCreatePcc returns a boolean if a field has been set. -func (o *GroupProperties) HasCreatePcc() bool { - if o != nil && o.CreatePcc != nil { +// HasCreateDataCenter returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateDataCenter() bool { + if o != nil && o.CreateDataCenter != nil { return true } 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 { +// 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.S3Privilege + return o.CreateFlowLog } -// GetS3PrivilegeOk returns a tuple with the S3Privilege 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) GetS3PrivilegeOk() (*bool, bool) { +func (o *GroupProperties) GetCreateFlowLogOk() (*bool, bool) { if o == nil { return nil, false } - return o.S3Privilege, true + return o.CreateFlowLog, true } -// SetS3Privilege sets field value -func (o *GroupProperties) SetS3Privilege(v bool) { +// SetCreateFlowLog sets field value +func (o *GroupProperties) SetCreateFlowLog(v bool) { - o.S3Privilege = &v + o.CreateFlowLog = &v } -// HasS3Privilege returns a boolean if a field has been set. -func (o *GroupProperties) HasS3Privilege() bool { - if o != nil && o.S3Privilege != 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 } -// 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 { +// 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.CreateBackupUnit + return o.CreateInternetAccess } -// GetCreateBackupUnitOk returns a tuple with the CreateBackupUnit 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) GetCreateBackupUnitOk() (*bool, bool) { +func (o *GroupProperties) GetCreateInternetAccessOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateBackupUnit, true + return o.CreateInternetAccess, true } -// SetCreateBackupUnit sets field value -func (o *GroupProperties) SetCreateBackupUnit(v bool) { +// SetCreateInternetAccess sets field value +func (o *GroupProperties) SetCreateInternetAccess(v bool) { - o.CreateBackupUnit = &v + o.CreateInternetAccess = &v } -// HasCreateBackupUnit returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateBackupUnit() bool { - if o != nil && o.CreateBackupUnit != 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 } -// 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 { +// 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.CreateInternetAccess + return o.CreateK8sCluster } -// GetCreateInternetAccessOk returns a tuple with the CreateInternetAccess 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) GetCreateInternetAccessOk() (*bool, bool) { +func (o *GroupProperties) GetCreateK8sClusterOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateInternetAccess, true + return o.CreateK8sCluster, true } -// SetCreateInternetAccess sets field value -func (o *GroupProperties) SetCreateInternetAccess(v bool) { +// SetCreateK8sCluster sets field value +func (o *GroupProperties) SetCreateK8sCluster(v bool) { - o.CreateInternetAccess = &v + o.CreateK8sCluster = &v } -// HasCreateInternetAccess returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateInternetAccess() bool { - if o != nil && o.CreateInternetAccess != nil { +// HasCreateK8sCluster returns a boolean if a field has been set. +func (o *GroupProperties) HasCreateK8sCluster() bool { + if o != nil && o.CreateK8sCluster != 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 { +// GetCreatePcc returns the CreatePcc field value +// If the value is explicit nil, nil is returned +func (o *GroupProperties) GetCreatePcc() *bool { if o == nil { return nil } - return o.CreateK8sCluster + return o.CreatePcc } -// GetCreateK8sClusterOk returns a tuple with the CreateK8sCluster field value +// GetCreatePccOk returns a tuple with the CreatePcc field value // and a 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) GetCreatePccOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateK8sCluster, true + return o.CreatePcc, true } -// SetCreateK8sCluster sets field value -func (o *GroupProperties) SetCreateK8sCluster(v bool) { +// SetCreatePcc sets field value +func (o *GroupProperties) SetCreatePcc(v bool) { - o.CreateK8sCluster = &v + o.CreatePcc = &v } -// HasCreateK8sCluster returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateK8sCluster() bool { - if o != nil && o.CreateK8sCluster != nil { +// HasCreatePcc returns a boolean if a field has been set. +func (o *GroupProperties) HasCreatePcc() bool { + if o != nil && o.CreatePcc != 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 { +// 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.CreateFlowLog + return o.CreateSnapshot } -// GetCreateFlowLogOk returns a tuple with the CreateFlowLog 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) GetCreateFlowLogOk() (*bool, bool) { +func (o *GroupProperties) GetCreateSnapshotOk() (*bool, bool) { if o == nil { return nil, false } - return o.CreateFlowLog, true + return o.CreateSnapshot, true } -// SetCreateFlowLog sets field value -func (o *GroupProperties) SetCreateFlowLog(v bool) { +// SetCreateSnapshot sets field value +func (o *GroupProperties) SetCreateSnapshot(v bool) { - o.CreateFlowLog = &v + o.CreateSnapshot = &v } -// HasCreateFlowLog returns a boolean if a field has been set. -func (o *GroupProperties) HasCreateFlowLog() bool { - if o != nil && o.CreateFlowLog != 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 } -// 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 { +// 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.AccessAndManageMonitoring + return o.ManageDBaaS } -// GetAccessAndManageMonitoringOk returns a tuple with the AccessAndManageMonitoring 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) GetAccessAndManageMonitoringOk() (*bool, bool) { +func (o *GroupProperties) GetManageDBaaSOk() (*bool, bool) { if o == nil { return nil, false } - return o.AccessAndManageMonitoring, true + return o.ManageDBaaS, true } -// SetAccessAndManageMonitoring sets field value -func (o *GroupProperties) SetAccessAndManageMonitoring(v bool) { +// SetManageDBaaS sets field value +func (o *GroupProperties) SetManageDBaaS(v bool) { - o.AccessAndManageMonitoring = &v + o.ManageDBaaS = &v } -// HasAccessAndManageMonitoring returns a boolean if a field has been set. -func (o *GroupProperties) HasAccessAndManageMonitoring() bool { - if o != nil && o.AccessAndManageMonitoring != 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 } -// 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 { +// 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.AccessAndManageCertificates + return o.ManageDataplatform } -// GetAccessAndManageCertificatesOk returns a tuple with the AccessAndManageCertificates 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) GetAccessAndManageCertificatesOk() (*bool, bool) { +func (o *GroupProperties) GetManageDataplatformOk() (*bool, bool) { if o == nil { return nil, false } - return o.AccessAndManageCertificates, true + return o.ManageDataplatform, true } -// SetAccessAndManageCertificates sets field value -func (o *GroupProperties) SetAccessAndManageCertificates(v bool) { +// SetManageDataplatform sets field value +func (o *GroupProperties) SetManageDataplatform(v bool) { - o.AccessAndManageCertificates = &v + o.ManageDataplatform = &v } -// HasAccessAndManageCertificates returns a boolean if a field has been set. -func (o *GroupProperties) HasAccessAndManageCertificates() bool { - if o != nil && o.AccessAndManageCertificates != 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 } -// GetManageDBaaS returns the ManageDBaaS field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *GroupProperties) GetManageDBaaS() *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.ManageDBaaS + return o.ManageRegistry } -// GetManageDBaaSOk returns a tuple with the ManageDBaaS 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) GetManageDBaaSOk() (*bool, bool) { +func (o *GroupProperties) GetManageRegistryOk() (*bool, bool) { if o == nil { return nil, false } - return o.ManageDBaaS, true + return o.ManageRegistry, true } -// SetManageDBaaS sets field value -func (o *GroupProperties) SetManageDBaaS(v bool) { +// SetManageRegistry sets field value +func (o *GroupProperties) SetManageRegistry(v bool) { - o.ManageDBaaS = &v + o.ManageRegistry = &v } -// HasManageDBaaS returns a boolean if a field has been set. -func (o *GroupProperties) HasManageDBaaS() bool { - if o != nil && o.ManageDBaaS != 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 } -func (o GroupProperties) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name +// 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 } - if o.CreateDataCenter != nil { - toSerialize["createDataCenter"] = o.CreateDataCenter + + 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 *GroupProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false } - if o.CreateSnapshot != nil { - toSerialize["createSnapshot"] = o.CreateSnapshot + + return o.Name, true +} + +// SetName sets field value +func (o *GroupProperties) SetName(v string) { + + o.Name = &v + +} + +// HasName returns a boolean if a field has been set. +func (o *GroupProperties) HasName() bool { + if o != nil && o.Name != nil { + return true } - if o.ReserveIp != nil { - toSerialize["reserveIp"] = o.ReserveIp + + return false +} + +// 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.ReserveIp + +} + +// 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) GetReserveIpOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.ReserveIp, true +} + +// SetReserveIp sets field value +func (o *GroupProperties) SetReserveIp(v bool) { + + o.ReserveIp = &v + +} + +// 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 +} + +// 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.S3Privilege + +} + +// 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) GetS3PrivilegeOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.S3Privilege, true +} + +// SetS3Privilege sets field value +func (o *GroupProperties) SetS3Privilege(v bool) { + + o.S3Privilege = &v + +} + +// HasS3Privilege returns a boolean if a field has been set. +func (o *GroupProperties) HasS3Privilege() bool { + if o != nil && o.S3Privilege != nil { + return true } + + return false +} + +func (o GroupProperties) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} 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.AccessAndManageMonitoring != nil { - toSerialize["accessAndManageMonitoring"] = o.AccessAndManageMonitoring + + if o.CreatePcc != nil { + toSerialize["createPcc"] = o.CreatePcc } - if o.AccessAndManageCertificates != nil { - toSerialize["accessAndManageCertificates"] = o.AccessAndManageCertificates + + if o.CreateSnapshot != nil { + toSerialize["createSnapshot"] = o.CreateSnapshot } + 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_share.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_share.go index a25a874a..ae84478a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_share.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_share_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_share_properties.go index 5e356c12..1ca06267 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_share_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_shares.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_shares.go index 6735473c..091da39c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_shares.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_users.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_users.go index a2fb51bc..4a4f075c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_group_users.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_groups.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_groups.go index 85df0a37..578d27c1 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_groups.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_image.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_image.go index 747a0e94..962c8e2e 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_image.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_image_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_image_properties.go index 94cc7e9b..f6059779 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_image_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_images.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_images.go index 42276184..1cec4020 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_images.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_info.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_info.go index 123accc0..2ada276b 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_info.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_block.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_block.go index af07f6fb..c7e16a0f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_block.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_block_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_block_properties.go index 4f732b53..19c3ed75 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_block_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_blocks.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_blocks.go index 010dc17f..117235c8 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_blocks.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_consumer.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_consumer.go index a0e9e55c..e405979f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_consumer.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_failover.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_failover.go index 16677e73..60c902a9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_ip_failover.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_auto_scaling.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_auto_scaling.go index 6ba3b8fd..49d9b3e8 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_auto_scaling.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster.go index 8931a164..994a6ac2 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_entities.go index 3e5dbaf4..0e7daca3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_for_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_for_post.go index 8f375515..cf2d02e6 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_for_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_for_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_for_put.go index 2873bf5c..6edf7ca5 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_for_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties.go index d8871736..ed0629c7 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties.go @@ -16,19 +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"` - // 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"` // 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"` + // 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"` // 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 @@ -39,6 +47,8 @@ func NewKubernetesClusterProperties(name string) *KubernetesClusterProperties { this := KubernetesClusterProperties{} this.Name = &name + var public bool = true + this.Public = &public return &this } @@ -48,41 +58,81 @@ func NewKubernetesClusterProperties(name string) *KubernetesClusterProperties { // but it doesn't guarantee that properties required by API are set func NewKubernetesClusterPropertiesWithDefaults() *KubernetesClusterProperties { this := KubernetesClusterProperties{} + var public bool = true + this.Public = &public 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 } @@ -90,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 @@ -127,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 @@ -165,114 +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 } -// 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 { +// 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.ApiSubnetAllowList + return o.NodeSubnet } -// GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList 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) GetApiSubnetAllowListOk() (*[]string, bool) { +func (o *KubernetesClusterProperties) GetNodeSubnetOk() (*string, bool) { if o == nil { return nil, false } - return o.ApiSubnetAllowList, true + return o.NodeSubnet, true } -// SetApiSubnetAllowList sets field value -func (o *KubernetesClusterProperties) SetApiSubnetAllowList(v []string) { +// SetNodeSubnet sets field value +func (o *KubernetesClusterProperties) SetNodeSubnet(v string) { - o.ApiSubnetAllowList = &v + o.NodeSubnet = &v } -// HasApiSubnetAllowList returns a boolean if a field has been set. -func (o *KubernetesClusterProperties) HasApiSubnetAllowList() bool { - if o != nil && o.ApiSubnetAllowList != 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 +} + +// 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.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 *KubernetesClusterProperties) GetPublicOk() (*bool, bool) { + if o == nil { + return nil, false + } + + return o.Public, true +} + +// SetPublic sets field value +func (o *KubernetesClusterProperties) SetPublic(v bool) { + + o.Public = &v + +} + +// HasPublic returns a boolean if a field has been set. +func (o *KubernetesClusterProperties) HasPublic() bool { + if o != nil && o.Public != nil { return true } @@ -280,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 @@ -317,29 +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.ApiSubnetAllowList != nil { - toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + + if o.NodeSubnet != nil { + toSerialize["nodeSubnet"] = o.NodeSubnet } + + if o.Public != nil { + toSerialize["public"] = o.Public + } + if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } + + if o.ViableNodePoolVersions != nil { + toSerialize["viableNodePoolVersions"] = o.ViableNodePoolVersions + } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_post.go index dd13952f..14c2b97b 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_post.go @@ -16,14 +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"` - // 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 + // 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"` + // 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"` } @@ -35,6 +43,8 @@ func NewKubernetesClusterPropertiesForPost(name string) *KubernetesClusterProper this := KubernetesClusterPropertiesForPost{} this.Name = &name + var public bool = true + this.Public = &public return &this } @@ -44,41 +54,43 @@ func NewKubernetesClusterPropertiesForPost(name string) *KubernetesClusterProper // but it doesn't guarantee that properties required by API are set func NewKubernetesClusterPropertiesForPostWithDefaults() *KubernetesClusterPropertiesForPost { this := KubernetesClusterPropertiesForPost{} + var public bool = true + this.Public = &public 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 } @@ -86,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 @@ -123,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 @@ -161,38 +211,152 @@ func (o *KubernetesClusterPropertiesForPost) 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 *KubernetesClusterPropertiesForPost) GetApiSubnetAllowList() *[]string { +// 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.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 *KubernetesClusterPropertiesForPost) GetApiSubnetAllowListOk() (*[]string, bool) { +func (o *KubernetesClusterPropertiesForPost) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.ApiSubnetAllowList, true + return o.Name, true } -// SetApiSubnetAllowList sets field value -func (o *KubernetesClusterPropertiesForPost) SetApiSubnetAllowList(v []string) { +// SetName sets field value +func (o *KubernetesClusterPropertiesForPost) SetName(v string) { - o.ApiSubnetAllowList = &v + o.Name = &v } -// HasApiSubnetAllowList returns a boolean if a field has been set. -func (o *KubernetesClusterPropertiesForPost) HasApiSubnetAllowList() bool { - if o != nil && o.ApiSubnetAllowList != 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 +} + +// 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.NatGatewayIp + +} + +// 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) GetNatGatewayIpOk() (*string, bool) { + if o == nil { + return nil, false + } + + return o.NatGatewayIp, true +} + +// SetNatGatewayIp sets field value +func (o *KubernetesClusterPropertiesForPost) SetNatGatewayIp(v string) { + + o.NatGatewayIp = &v + +} + +// 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 } @@ -200,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 @@ -239,21 +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.ApiSubnetAllowList != nil { - toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList + + 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.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_put.go index c845c73b..b2bc4980 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_cluster_properties_for_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_clusters.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_clusters.go index 4066927e..84f19c35 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_clusters.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_maintenance_window.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_maintenance_window.go index e257e823..86d57625 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_maintenance_window.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node.go index b3d8e2b8..512c5231 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_metadata.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_metadata.go index 6d69ee2d..3915ed80 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_metadata.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool.go index 04b85946..9649a8ad 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_for_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_for_post.go index 8fd4e742..afeef99c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_for_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_for_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_for_put.go index 46fda0f5..94df03dd 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_for_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_lan.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_lan.go index 88b08990..926f1498 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_lan.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_lan_routes.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_lan_routes.go index 0d57c459..7ba035e4 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_lan_routes.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties.go index e6fca9fa..376120c0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties.go @@ -16,56 +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"` + // 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 } @@ -78,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 } @@ -231,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 @@ -268,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 } @@ -459,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 @@ -496,228 +496,228 @@ 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 } @@ -726,57 +726,74 @@ func (o *KubernetesNodePoolProperties) HasAvailableUpgradeVersions() bool { func (o KubernetesNodePoolProperties) 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.DatacenterId != nil { - toSerialize["datacenterId"] = o.DatacenterId + + if o.AutoScaling != nil { + toSerialize["autoScaling"] = o.AutoScaling } - if o.NodeCount != nil { - toSerialize["nodeCount"] = o.NodeCount + + if o.AvailabilityZone != nil { + toSerialize["availabilityZone"] = o.AvailabilityZone } - if o.CpuFamily != nil { - toSerialize["cpuFamily"] = o.CpuFamily + + if o.AvailableUpgradeVersions != nil { + toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions } + 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.AvailableUpgradeVersions != nil { - toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions + + 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_post.go index 9716f7e9..c55191cf 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_post.go @@ -16,54 +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"` + // 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 } @@ -76,608 +76,608 @@ 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 { +// 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.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 *KubernetesNodePoolPropertiesForPost) GetNameOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) 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 *KubernetesNodePoolPropertiesForPost) SetName(v string) { +// SetAnnotations sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetAnnotations(v map[string]string) { - o.Name = &v + o.Annotations = &v } -// HasName returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasName() bool { - if o != nil && o.Name != 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 } -// 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 { +// 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.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 *KubernetesNodePoolPropertiesForPost) GetDatacenterIdOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } - return o.DatacenterId, true + return o.AutoScaling, true } -// SetDatacenterId sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetDatacenterId(v string) { +// SetAutoScaling sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetAutoScaling(v KubernetesAutoScaling) { - o.DatacenterId = &v + o.AutoScaling = &v } -// HasDatacenterId returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasDatacenterId() bool { - if o != nil && o.DatacenterId != 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 } -// 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 { +// 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.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 *KubernetesNodePoolPropertiesForPost) GetNodeCountOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } - return o.NodeCount, true + return o.AvailabilityZone, true } -// SetNodeCount sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetNodeCount(v int32) { +// SetAvailabilityZone sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetAvailabilityZone(v string) { - o.NodeCount = &v + o.AvailabilityZone = &v } -// HasNodeCount returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasNodeCount() bool { - if o != nil && o.NodeCount != nil { +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) 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 *KubernetesNodePoolPropertiesForPost) GetCpuFamily() *string { +// GetCoresCount returns the CoresCount field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetCoresCount() *int32 { if o == nil { return nil } - return o.CpuFamily + return o.CoresCount } -// GetCpuFamilyOk returns a tuple with the CpuFamily field value +// GetCoresCountOk returns a tuple with the CoresCount field value // and a 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) GetCoresCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.CpuFamily, true + return o.CoresCount, true } -// SetCpuFamily sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetCpuFamily(v string) { +// SetCoresCount sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetCoresCount(v int32) { - o.CpuFamily = &v + o.CoresCount = &v } -// HasCpuFamily returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasCpuFamily() bool { - if o != nil && o.CpuFamily != nil { +// HasCoresCount returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasCoresCount() bool { + if o != nil && o.CoresCount != nil { return true } return false } -// GetCoresCount returns the CoresCount field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *KubernetesNodePoolPropertiesForPost) GetCoresCount() *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.CoresCount + return o.CpuFamily } -// GetCoresCountOk returns a tuple with the CoresCount 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) GetCoresCountOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } - return o.CoresCount, true + return o.CpuFamily, true } -// SetCoresCount sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetCoresCount(v int32) { +// SetCpuFamily sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetCpuFamily(v string) { - o.CoresCount = &v + o.CpuFamily = &v } -// HasCoresCount returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasCoresCount() bool { - if o != nil && o.CoresCount != 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 } -// 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 { +// 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.RamSize + return o.DatacenterId } -// GetRamSizeOk returns a tuple with the RamSize 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) GetRamSizeOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } - return o.RamSize, true + return o.DatacenterId, true } -// SetRamSize sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetRamSize(v int32) { +// SetDatacenterId sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetDatacenterId(v string) { - o.RamSize = &v + o.DatacenterId = &v } -// HasRamSize returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasRamSize() bool { - if o != nil && o.RamSize != 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 } -// 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 { +// 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.AvailabilityZone + return o.K8sVersion } -// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone 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) GetAvailabilityZoneOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } - return o.AvailabilityZone, true + return o.K8sVersion, true } -// SetAvailabilityZone sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetAvailabilityZone(v string) { +// SetK8sVersion sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetK8sVersion(v string) { - o.AvailabilityZone = &v + o.K8sVersion = &v } -// HasAvailabilityZone returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasAvailabilityZone() bool { - if o != nil && o.AvailabilityZone != 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 } -// 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 { +// 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.StorageType + return o.Labels } -// GetStorageTypeOk returns a tuple with the StorageType 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) GetStorageTypeOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.StorageType, true + return o.Labels, true } -// SetStorageType sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetStorageType(v string) { +// SetLabels sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetLabels(v map[string]string) { - o.StorageType = &v + o.Labels = &v } -// HasStorageType returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasStorageType() bool { - if o != nil && o.StorageType != 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 } -// 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 { +// 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.StorageSize + return o.Lans } -// GetStorageSizeOk returns a tuple with the StorageSize 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) GetStorageSizeOk() (*int32, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } - return o.StorageSize, true + return o.Lans, true } -// SetStorageSize sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetStorageSize(v int32) { +// SetLans sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetLans(v []KubernetesNodePoolLan) { - o.StorageSize = &v + o.Lans = &v } -// HasStorageSize returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasStorageSize() bool { - if o != nil && o.StorageSize != nil { +// HasLans returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasLans() bool { + if o != nil && o.Lans != 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 { +// GetMaintenanceWindow returns the MaintenanceWindow field value +// If the value is explicit nil, nil is returned +func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } - return o.K8sVersion + return o.MaintenanceWindow } -// GetK8sVersionOk returns a tuple with the K8sVersion 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 *KubernetesNodePoolPropertiesForPost) GetK8sVersionOk() (*string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } - return o.K8sVersion, true + return o.MaintenanceWindow, true } -// SetK8sVersion sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetK8sVersion(v string) { +// SetMaintenanceWindow sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { - o.K8sVersion = &v + o.MaintenanceWindow = &v } -// HasK8sVersion returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasK8sVersion() bool { - if o != nil && o.K8sVersion != nil { +// HasMaintenanceWindow returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasMaintenanceWindow() bool { + if o != nil && o.MaintenanceWindow != 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 -func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindow() *KubernetesMaintenanceWindow { +// 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.MaintenanceWindow + return o.Name } -// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow 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) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.MaintenanceWindow, true + return o.Name, true } -// SetMaintenanceWindow sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { +// SetName sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetName(v string) { - o.MaintenanceWindow = &v + o.Name = &v } -// HasMaintenanceWindow returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasMaintenanceWindow() bool { - if o != nil && o.MaintenanceWindow != 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 } -// 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 { +// 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.AutoScaling + return o.NodeCount } -// GetAutoScalingOk returns a tuple with the AutoScaling 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) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } - return o.AutoScaling, true + return o.NodeCount, true } -// SetAutoScaling sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetAutoScaling(v KubernetesAutoScaling) { +// SetNodeCount sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetNodeCount(v int32) { - o.AutoScaling = &v + o.NodeCount = &v } -// HasAutoScaling returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasAutoScaling() bool { - if o != nil && o.AutoScaling != 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 } -// 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 { +// 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.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 *KubernetesNodePoolPropertiesForPost) GetLansOk() (*[]KubernetesNodePoolLan, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } - return o.Lans, true + return o.PublicIps, true } -// SetLans sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetLans(v []KubernetesNodePoolLan) { +// SetPublicIps sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetPublicIps(v []string) { - o.Lans = &v + o.PublicIps = &v } -// HasLans returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasLans() bool { - if o != nil && o.Lans != 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 } -// 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 { +// 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.Labels + return o.RamSize } -// GetLabelsOk returns a tuple with the Labels 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) GetLabelsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetRamSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.Labels, true + return o.RamSize, true } -// SetLabels sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetLabels(v map[string]string) { +// SetRamSize sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetRamSize(v int32) { - o.Labels = &v + o.RamSize = &v } -// HasLabels returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasLabels() bool { - if o != nil && o.Labels != 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 } -// 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 { +// 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.Annotations + return o.StorageSize } -// GetAnnotationsOk returns a tuple with the Annotations 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) GetAnnotationsOk() (*map[string]string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetStorageSizeOk() (*int32, bool) { if o == nil { return nil, false } - return o.Annotations, true + return o.StorageSize, true } -// SetAnnotations sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetAnnotations(v map[string]string) { +// SetStorageSize sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetStorageSize(v int32) { - o.Annotations = &v + o.StorageSize = &v } -// HasAnnotations returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasAnnotations() bool { - if o != nil && o.Annotations != 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 } -// 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 { +// 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.PublicIps + return o.StorageType } -// GetPublicIpsOk returns a tuple with the PublicIps 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) GetPublicIpsOk() (*[]string, bool) { +func (o *KubernetesNodePoolPropertiesForPost) GetStorageTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.PublicIps, true + return o.StorageType, true } -// SetPublicIps sets field value -func (o *KubernetesNodePoolPropertiesForPost) SetPublicIps(v []string) { +// SetStorageType sets field value +func (o *KubernetesNodePoolPropertiesForPost) SetStorageType(v string) { - o.PublicIps = &v + o.StorageType = &v } -// HasPublicIps returns a boolean if a field has been set. -func (o *KubernetesNodePoolPropertiesForPost) HasPublicIps() bool { - if o != nil && o.PublicIps != nil { +// HasStorageType returns a boolean if a field has been set. +func (o *KubernetesNodePoolPropertiesForPost) HasStorageType() bool { + if o != nil && o.StorageType != nil { return true } @@ -686,54 +686,70 @@ func (o *KubernetesNodePoolPropertiesForPost) HasPublicIps() 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.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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_put.go index 3b0081c3..3e82ea9c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pool_properties_for_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pools.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pools.go index 9e9d8d80..50ebf556 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_pools.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_properties.go index eee05965..e5f67c96 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_node_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_nodes.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_nodes.go index 8381bf4c..a96c0384 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_kubernetes_nodes.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_label.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_label.go index c162e676..f28f2af5 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_label.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_properties.go index a7a0d794..f561a5fb 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resource.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resource.go index 29ebef96..9963122a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resource.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resource_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resource_properties.go index ef0836df..e83bc0c9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resource_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resources.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resources.go index 673f4f32..43bf07e0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_label_resources.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_labels.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_labels.go index d83bdbcf..f2be7da3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_labels.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan.go index 120c2f17..09a44f4e 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_entities.go index f4d242ac..368746a4 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_nics.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_nics.go index f348c145..06cc683f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_nics.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_post.go index 3af870c6..ce97f15f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_properties.go index 763ced62..141f0e1d 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_properties_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_properties_post.go index 3492c207..a7da1b9f 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lan_properties_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_lans.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_lans.go index 361b3809..b0ee52ca 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_lans.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer.go index 822d7f1c..064e5eb9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer_entities.go index 129844dc..8a4c5049 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer_properties.go index e6b9b02f..9d1f3cee 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancer_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancers.go index 166560f9..267eba36 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_loadbalancers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_location.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_location.go index 59a250d4..379723ff 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_location.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_location_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_location_properties.go index 15326cca..95da4abb 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_location_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_locations.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_locations.go index ba9354ac..d3311051 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_locations.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway.go index 70f8e92a..2feaa609 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_entities.go index d51cb954..94fae49c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_lan_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_lan_properties.go index 007a57d6..068b141b 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_lan_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_properties.go index 6eea997e..ad784ad9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_put.go index cf9a8a04..5bd37720 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule.go index 42d20aac..4693555c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule_properties.go index 8b3da441..32330ace 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule_put.go index 2f709351..e0f92b40 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rule_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rules.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rules.go index 780bef1f..9d3d4135 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateway_rules.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateways.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateways.go index ea80671f..2139508c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nat_gateways.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer.go index 265e075f..efaed067 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_entities.go index 85dd3bbd..cdd74071 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule.go index 8f054c88..d5018315 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_health_check.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_health_check.go index 3fa9df4f..cd16a13e 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_health_check.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_properties.go index d8ba812a..c3131afa 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_put.go index ee8f95ae..16c6e39b 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_target.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_target.go index 502d5bda..f02e7608 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_target.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_target_health_check.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_target_health_check.go index 8fac2b6d..8d7e994a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rule_target_health_check.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rules.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rules.go index a23c7740..2668d632 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_forwarding_rules.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_properties.go index 94170d45..114b8b08 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_put.go index 05bde508..ec4deb54 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancer_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancers.go index 91bbe63e..b4ccbbc8 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_network_load_balancers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic.go index 9d8378c6..6a9c0553 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_entities.go index b1a5553a..ab19ab4a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_properties.go index 17feb8a4..c24c1a4c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_put.go index e37c8107..0029a6ea 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nic_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_nics.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_nics.go index 80ff9957..6fe1220a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_nics.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_no_state_meta_data.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_no_state_meta_data.go index 4d1488a1..bf6d643d 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_no_state_meta_data.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_pagination_links.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_pagination_links.go index fa3c76de..5b8bef30 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_pagination_links.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_peer.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_peer.go index db7c562b..582ff98a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_peer.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connect.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connect.go index f0aa7eb8..1a417e85 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connect.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connect_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connect_properties.go index a92dc809..864e5ada 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connect_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connects.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connects.go index 7112f9a3..3c82ad39 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_private_cross_connects.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_remote_console_url.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_remote_console_url.go index 4088c7a8..74f96ce3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_remote_console_url.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_request.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_request.go index 5ac4f485..adc351ff 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_request.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_metadata.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_metadata.go index 3ea319b3..1b634615 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_metadata.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_properties.go index 94d04093..e43b39d9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_status.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_status.go index e772df8e..f4ca3cee 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_status.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_status_metadata.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_status_metadata.go index ef97dbed..29b9967c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_status_metadata.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_target.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_target.go index 590a5dfa..dc56f80a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_request_target.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_requests.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_requests.go index 3d67bdc8..0bf44ade 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_requests.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource.go index 1d370ce2..82b8f739 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_entities.go index cc9f26ac..735ffe73 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_groups.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_groups.go index ae893926..8d0a2a1a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_groups.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_limits.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_limits.go index 4acc2299..ca9ee840 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_limits.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_properties.go index b5b274a2..224350ec 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_reference.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_reference.go index 5732ab57..6b58f76a 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resource_reference.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resources.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resources.go index 36b8beea..9db50433 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resources.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_resources_users.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_resources_users.go index 18de5cf5..e8772006 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_resources_users.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_bucket.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_bucket.go index cf175f53..5e263873 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_bucket.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key.go index 5febf419..ae9f0090 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key_metadata.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key_metadata.go index 83ecc8b4..f090555e 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key_metadata.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key_properties.go index a3204d71..0cf12e77 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_key_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_keys.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_keys.go index a87bc2f7..d0ed78cc 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_keys.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_object_storage_sso.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_object_storage_sso.go index 48eb4b16..809410a0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_s3_object_storage_sso.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_server.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_server.go index ad75b98a..4002c4bd 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_server.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_server_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_server_entities.go index fcb42fdb..a2a8b891 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_server_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_server_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_server_properties.go index eb67dfcc..5b81d955 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_server_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_servers.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_servers.go index 86fe0d2d..789aeaeb 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_servers.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshot.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshot.go index 56ebb960..c42cc054 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshot.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshot_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshot_properties.go index b42dca20..5eb8cea6 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshot_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshots.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshots.go index 8578d03d..313d03e0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_snapshots.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group.go index e6e53ca9..cbfb0271 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group.go @@ -16,14 +16,14 @@ import ( // 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"` - // 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 *TargetGroupProperties `json:"properties"` + // The type of object that has been created. + Type *Type `json:"type,omitempty"` } // NewTargetGroup instantiates a new TargetGroup object @@ -46,190 +46,190 @@ func NewTargetGroupWithDefaults() *TargetGroup { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroup) GetId() *string { +// 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.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 *TargetGroup) GetIdOk() (*string, bool) { +func (o *TargetGroup) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *TargetGroup) SetId(v string) { +// SetHref sets field value +func (o *TargetGroup) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *TargetGroup) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *TargetGroup) GetType() *Type { +// 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.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 *TargetGroup) GetTypeOk() (*Type, bool) { +func (o *TargetGroup) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *TargetGroup) SetType(v Type) { +// SetId sets field value +func (o *TargetGroup) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *TargetGroup) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroup) GetHref() *string { +// 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.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 *TargetGroup) GetHrefOk() (*string, bool) { +func (o *TargetGroup) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Metadata, true } -// SetHref sets field value -func (o *TargetGroup) SetHref(v string) { +// SetMetadata sets field value +func (o *TargetGroup) SetMetadata(v DatacenterElementMetadata) { - o.Href = &v + o.Metadata = &v } -// HasHref returns a boolean if a field has been set. -func (o *TargetGroup) HasHref() bool { - if o != nil && o.Href != nil { +// 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 } -// GetMetadata returns the Metadata field value -// If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned -func (o *TargetGroup) GetMetadata() *DatacenterElementMetadata { +// 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.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 *TargetGroup) GetMetadataOk() (*DatacenterElementMetadata, bool) { +func (o *TargetGroup) GetPropertiesOk() (*TargetGroupProperties, bool) { if o == nil { return nil, false } - return o.Metadata, true + return o.Properties, true } -// SetMetadata sets field value -func (o *TargetGroup) SetMetadata(v DatacenterElementMetadata) { +// SetProperties sets field value +func (o *TargetGroup) SetProperties(v TargetGroupProperties) { - o.Metadata = &v + o.Properties = &v } -// HasMetadata returns a boolean if a field has been set. -func (o *TargetGroup) HasMetadata() bool { - if o != nil && o.Metadata != nil { +// 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 } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for TargetGroupProperties will be returned -func (o *TargetGroup) GetProperties() *TargetGroupProperties { +// 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.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 *TargetGroup) GetPropertiesOk() (*TargetGroupProperties, bool) { +func (o *TargetGroup) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *TargetGroup) SetProperties(v TargetGroupProperties) { +// SetType sets field value +func (o *TargetGroup) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *TargetGroup) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *TargetGroup) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -238,21 +238,26 @@ func (o *TargetGroup) HasProperties() bool { func (o TargetGroup) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_health_check.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_health_check.go index 9f55b7d7..70ca3dc6 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_health_check.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_health_check.go @@ -16,11 +16,11 @@ import ( // TargetGroupHealthCheck struct for TargetGroupHealthCheck type TargetGroupHealthCheck struct { - // The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established. - CheckTimeout *int32 `json:"checkTimeout,omitempty"` - // The interval in milliseconds between consecutive health checks; default is 2000. + // The interval in milliseconds between consecutive health checks; the default value is '2000'. CheckInterval *int32 `json:"checkInterval,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. + // 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"` } @@ -42,76 +42,76 @@ func NewTargetGroupHealthCheckWithDefaults() *TargetGroupHealthCheck { return &this } -// GetCheckTimeout returns the CheckTimeout field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TargetGroupHealthCheck) GetCheckTimeout() *int32 { +// 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.CheckTimeout + return o.CheckInterval } -// GetCheckTimeoutOk returns a tuple with the CheckTimeout field value +// 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) GetCheckTimeoutOk() (*int32, bool) { +func (o *TargetGroupHealthCheck) GetCheckIntervalOk() (*int32, bool) { if o == nil { return nil, false } - return o.CheckTimeout, true + return o.CheckInterval, true } -// SetCheckTimeout sets field value -func (o *TargetGroupHealthCheck) SetCheckTimeout(v int32) { +// SetCheckInterval sets field value +func (o *TargetGroupHealthCheck) SetCheckInterval(v int32) { - o.CheckTimeout = &v + o.CheckInterval = &v } -// HasCheckTimeout returns a boolean if a field has been set. -func (o *TargetGroupHealthCheck) HasCheckTimeout() bool { - if o != nil && o.CheckTimeout != nil { +// 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 } -// GetCheckInterval returns the CheckInterval field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TargetGroupHealthCheck) GetCheckInterval() *int32 { +// 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.CheckInterval + return o.CheckTimeout } -// GetCheckIntervalOk returns a tuple with the CheckInterval field value +// 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) GetCheckIntervalOk() (*int32, bool) { +func (o *TargetGroupHealthCheck) GetCheckTimeoutOk() (*int32, bool) { if o == nil { return nil, false } - return o.CheckInterval, true + return o.CheckTimeout, true } -// SetCheckInterval sets field value -func (o *TargetGroupHealthCheck) SetCheckInterval(v int32) { +// SetCheckTimeout sets field value +func (o *TargetGroupHealthCheck) SetCheckTimeout(v int32) { - o.CheckInterval = &v + o.CheckTimeout = &v } -// HasCheckInterval returns a boolean if a field has been set. -func (o *TargetGroupHealthCheck) HasCheckInterval() bool { - if o != nil && o.CheckInterval != nil { +// HasCheckTimeout returns a boolean if a field has been set. +func (o *TargetGroupHealthCheck) HasCheckTimeout() bool { + if o != nil && o.CheckTimeout != nil { return true } @@ -119,7 +119,7 @@ func (o *TargetGroupHealthCheck) HasCheckInterval() bool { } // GetRetries returns the Retries 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 *TargetGroupHealthCheck) GetRetries() *int32 { if o == nil { return nil @@ -158,15 +158,18 @@ func (o *TargetGroupHealthCheck) HasRetries() bool { func (o TargetGroupHealthCheck) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.CheckTimeout != nil { - toSerialize["checkTimeout"] = o.CheckTimeout - } 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) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_http_health_check.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_http_health_check.go index ca2dd8f3..dc31f495 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_http_health_check.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_http_health_check.go @@ -16,18 +16,18 @@ import ( // TargetGroupHttpHealthCheck struct for TargetGroupHttpHealthCheck type TargetGroupHttpHealthCheck struct { - // The path (destination URL) for the HTTP health check request; the default is /. - Path *string `json:"path,omitempty"` - // The method for the HTTP health check. - Method *string `json:"method,omitempty"` - // + // Specify the target's response type to match ALB's request. MatchType *string `json:"matchType"` - // The response returned by the request, depending on the match type. - Response *string `json:"response"` - // - Regex *bool `json:"regex,omitempty"` - // + // 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 @@ -51,38 +51,38 @@ func NewTargetGroupHttpHealthCheckWithDefaults() *TargetGroupHttpHealthCheck { return &this } -// GetPath returns the Path field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupHttpHealthCheck) GetPath() *string { +// 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.Path + return o.MatchType } -// GetPathOk returns a tuple with the Path field value +// 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) GetPathOk() (*string, bool) { +func (o *TargetGroupHttpHealthCheck) GetMatchTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.Path, true + return o.MatchType, true } -// SetPath sets field value -func (o *TargetGroupHttpHealthCheck) SetPath(v string) { +// SetMatchType sets field value +func (o *TargetGroupHttpHealthCheck) SetMatchType(v string) { - o.Path = &v + o.MatchType = &v } -// HasPath returns a boolean if a field has been set. -func (o *TargetGroupHttpHealthCheck) HasPath() bool { - if o != nil && o.Path != nil { +// HasMatchType returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasMatchType() bool { + if o != nil && o.MatchType != nil { return true } @@ -90,7 +90,7 @@ func (o *TargetGroupHttpHealthCheck) HasPath() bool { } // GetMethod returns the Method 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 *TargetGroupHttpHealthCheck) GetMethod() *string { if o == nil { return nil @@ -127,76 +127,76 @@ func (o *TargetGroupHttpHealthCheck) HasMethod() bool { return false } -// GetMatchType returns the MatchType field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupHttpHealthCheck) GetMatchType() *string { +// 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.MatchType + return o.Negate } -// GetMatchTypeOk returns a tuple with the MatchType field value +// 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) GetMatchTypeOk() (*string, bool) { +func (o *TargetGroupHttpHealthCheck) GetNegateOk() (*bool, bool) { if o == nil { return nil, false } - return o.MatchType, true + return o.Negate, true } -// SetMatchType sets field value -func (o *TargetGroupHttpHealthCheck) SetMatchType(v string) { +// SetNegate sets field value +func (o *TargetGroupHttpHealthCheck) SetNegate(v bool) { - o.MatchType = &v + o.Negate = &v } -// HasMatchType returns a boolean if a field has been set. -func (o *TargetGroupHttpHealthCheck) HasMatchType() bool { - if o != nil && o.MatchType != nil { +// 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 } -// GetResponse returns the Response field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupHttpHealthCheck) GetResponse() *string { +// 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.Response + return o.Path } -// GetResponseOk returns a tuple with the Response field value +// 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) GetResponseOk() (*string, bool) { +func (o *TargetGroupHttpHealthCheck) GetPathOk() (*string, bool) { if o == nil { return nil, false } - return o.Response, true + return o.Path, true } -// SetResponse sets field value -func (o *TargetGroupHttpHealthCheck) SetResponse(v string) { +// SetPath sets field value +func (o *TargetGroupHttpHealthCheck) SetPath(v string) { - o.Response = &v + o.Path = &v } -// HasResponse returns a boolean if a field has been set. -func (o *TargetGroupHttpHealthCheck) HasResponse() bool { - if o != nil && o.Response != nil { +// HasPath returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasPath() bool { + if o != nil && o.Path != nil { return true } @@ -204,7 +204,7 @@ func (o *TargetGroupHttpHealthCheck) HasResponse() bool { } // GetRegex returns the Regex 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 *TargetGroupHttpHealthCheck) GetRegex() *bool { if o == nil { return nil @@ -241,38 +241,38 @@ func (o *TargetGroupHttpHealthCheck) HasRegex() bool { return false } -// GetNegate returns the Negate field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *TargetGroupHttpHealthCheck) GetNegate() *bool { +// 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.Negate + return o.Response } -// GetNegateOk returns a tuple with the Negate field value +// 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) GetNegateOk() (*bool, bool) { +func (o *TargetGroupHttpHealthCheck) GetResponseOk() (*string, bool) { if o == nil { return nil, false } - return o.Negate, true + return o.Response, true } -// SetNegate sets field value -func (o *TargetGroupHttpHealthCheck) SetNegate(v bool) { +// SetResponse sets field value +func (o *TargetGroupHttpHealthCheck) SetResponse(v string) { - o.Negate = &v + o.Response = &v } -// HasNegate returns a boolean if a field has been set. -func (o *TargetGroupHttpHealthCheck) HasNegate() bool { - if o != nil && o.Negate != nil { +// HasResponse returns a boolean if a field has been set. +func (o *TargetGroupHttpHealthCheck) HasResponse() bool { + if o != nil && o.Response != nil { return true } @@ -281,24 +281,30 @@ func (o *TargetGroupHttpHealthCheck) HasNegate() bool { func (o TargetGroupHttpHealthCheck) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Path != nil { - toSerialize["path"] = o.Path + if o.MatchType != nil { + toSerialize["matchType"] = o.MatchType } + if o.Method != nil { toSerialize["method"] = o.Method } - if o.MatchType != nil { - toSerialize["matchType"] = o.MatchType + + if o.Negate != nil { + toSerialize["negate"] = o.Negate } - if o.Response != nil { - toSerialize["response"] = o.Response + + if o.Path != nil { + toSerialize["path"] = o.Path } + if o.Regex != nil { toSerialize["regex"] = o.Regex } - if o.Negate != nil { - toSerialize["negate"] = o.Negate + + if o.Response != nil { + toSerialize["response"] = o.Response } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_properties.go index e5d19e59..f14f3486 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_properties.go @@ -16,27 +16,27 @@ import ( // TargetGroupProperties struct for TargetGroupProperties type TargetGroupProperties struct { - // The name of the target group. + // 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"` - // Balancing algorithm - Algorithm *string `json:"algorithm"` - // Balancing protocol + // The forwarding protocol. Only the value 'HTTP' is allowed. Protocol *string `json:"protocol"` // Array of items in the collection. - Targets *[]TargetGroupTarget `json:"targets,omitempty"` - HealthCheck *TargetGroupHealthCheck `json:"healthCheck,omitempty"` - HttpHealthCheck *TargetGroupHttpHealthCheck `json:"httpHealthCheck,omitempty"` + 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(name string, algorithm string, protocol string) *TargetGroupProperties { +func NewTargetGroupProperties(algorithm string, name string, protocol string) *TargetGroupProperties { this := TargetGroupProperties{} - this.Name = &name this.Algorithm = &algorithm + this.Name = &name this.Protocol = &protocol return &this @@ -50,228 +50,228 @@ func NewTargetGroupPropertiesWithDefaults() *TargetGroupProperties { return &this } -// GetName returns the Name field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupProperties) GetName() *string { +// 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.Name + return o.Algorithm } -// GetNameOk returns a tuple with the Name field value +// 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) GetNameOk() (*string, bool) { +func (o *TargetGroupProperties) GetAlgorithmOk() (*string, bool) { if o == nil { return nil, false } - return o.Name, true + return o.Algorithm, true } -// SetName sets field value -func (o *TargetGroupProperties) SetName(v string) { +// SetAlgorithm sets field value +func (o *TargetGroupProperties) SetAlgorithm(v string) { - o.Name = &v + o.Algorithm = &v } -// HasName returns a boolean if a field has been set. -func (o *TargetGroupProperties) HasName() bool { - if o != nil && o.Name != nil { +// 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 } -// GetAlgorithm returns the Algorithm field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupProperties) GetAlgorithm() *string { +// 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.Algorithm + return o.HealthCheck } -// GetAlgorithmOk returns a tuple with the Algorithm 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 *TargetGroupProperties) GetAlgorithmOk() (*string, bool) { +func (o *TargetGroupProperties) GetHealthCheckOk() (*TargetGroupHealthCheck, bool) { if o == nil { return nil, false } - return o.Algorithm, true + return o.HealthCheck, true } -// SetAlgorithm sets field value -func (o *TargetGroupProperties) SetAlgorithm(v string) { +// SetHealthCheck sets field value +func (o *TargetGroupProperties) SetHealthCheck(v TargetGroupHealthCheck) { - o.Algorithm = &v + o.HealthCheck = &v } -// HasAlgorithm returns a boolean if a field has been set. -func (o *TargetGroupProperties) HasAlgorithm() bool { - if o != nil && o.Algorithm != nil { +// 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 } -// GetProtocol returns the Protocol field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupProperties) GetProtocol() *string { +// 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.Protocol + return o.HttpHealthCheck } -// GetProtocolOk returns a tuple with the Protocol field value +// 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) GetProtocolOk() (*string, bool) { +func (o *TargetGroupProperties) GetHttpHealthCheckOk() (*TargetGroupHttpHealthCheck, bool) { if o == nil { return nil, false } - return o.Protocol, true + return o.HttpHealthCheck, true } -// SetProtocol sets field value -func (o *TargetGroupProperties) SetProtocol(v string) { +// SetHttpHealthCheck sets field value +func (o *TargetGroupProperties) SetHttpHealthCheck(v TargetGroupHttpHealthCheck) { - o.Protocol = &v + o.HttpHealthCheck = &v } -// HasProtocol returns a boolean if a field has been set. -func (o *TargetGroupProperties) HasProtocol() bool { - if o != nil && o.Protocol != nil { +// 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 } -// GetTargets returns the Targets field value -// If the value is explicit nil, the zero value for []TargetGroupTarget will be returned -func (o *TargetGroupProperties) GetTargets() *[]TargetGroupTarget { +// 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.Targets + return o.Name } -// GetTargetsOk returns a tuple with the Targets 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 *TargetGroupProperties) GetTargetsOk() (*[]TargetGroupTarget, bool) { +func (o *TargetGroupProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.Targets, true + return o.Name, true } -// SetTargets sets field value -func (o *TargetGroupProperties) SetTargets(v []TargetGroupTarget) { +// SetName sets field value +func (o *TargetGroupProperties) SetName(v string) { - o.Targets = &v + o.Name = &v } -// HasTargets returns a boolean if a field has been set. -func (o *TargetGroupProperties) HasTargets() bool { - if o != nil && o.Targets != nil { +// 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 } -// GetHealthCheck returns the HealthCheck field value -// If the value is explicit nil, the zero value for TargetGroupHealthCheck will be returned -func (o *TargetGroupProperties) GetHealthCheck() *TargetGroupHealthCheck { +// 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.HealthCheck + return o.Protocol } -// GetHealthCheckOk returns a tuple with the HealthCheck 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 *TargetGroupProperties) GetHealthCheckOk() (*TargetGroupHealthCheck, bool) { +func (o *TargetGroupProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } - return o.HealthCheck, true + return o.Protocol, true } -// SetHealthCheck sets field value -func (o *TargetGroupProperties) SetHealthCheck(v TargetGroupHealthCheck) { +// SetProtocol sets field value +func (o *TargetGroupProperties) SetProtocol(v string) { - o.HealthCheck = &v + o.Protocol = &v } -// HasHealthCheck returns a boolean if a field has been set. -func (o *TargetGroupProperties) HasHealthCheck() bool { - if o != nil && o.HealthCheck != nil { +// 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 } -// GetHttpHealthCheck returns the HttpHealthCheck field value -// If the value is explicit nil, the zero value for TargetGroupHttpHealthCheck will be returned -func (o *TargetGroupProperties) GetHttpHealthCheck() *TargetGroupHttpHealthCheck { +// 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.HttpHealthCheck + return o.Targets } -// GetHttpHealthCheckOk returns a tuple with the HttpHealthCheck field value +// 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) GetHttpHealthCheckOk() (*TargetGroupHttpHealthCheck, bool) { +func (o *TargetGroupProperties) GetTargetsOk() (*[]TargetGroupTarget, bool) { if o == nil { return nil, false } - return o.HttpHealthCheck, true + return o.Targets, true } -// SetHttpHealthCheck sets field value -func (o *TargetGroupProperties) SetHttpHealthCheck(v TargetGroupHttpHealthCheck) { +// SetTargets sets field value +func (o *TargetGroupProperties) SetTargets(v []TargetGroupTarget) { - o.HttpHealthCheck = &v + o.Targets = &v } -// HasHttpHealthCheck returns a boolean if a field has been set. -func (o *TargetGroupProperties) HasHttpHealthCheck() bool { - if o != nil && o.HttpHealthCheck != nil { +// HasTargets returns a boolean if a field has been set. +func (o *TargetGroupProperties) HasTargets() bool { + if o != nil && o.Targets != nil { return true } @@ -280,24 +280,30 @@ func (o *TargetGroupProperties) HasHttpHealthCheck() bool { func (o TargetGroupProperties) 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.Targets != nil { - toSerialize["targets"] = o.Targets - } + 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) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_put.go index a6221b15..b5f93b56 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_put.go @@ -16,13 +16,13 @@ import ( // 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"` + Id *string `json:"id,omitempty"` + Properties *TargetGroupProperties `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 *TargetGroupProperties `json:"properties"` } // NewTargetGroupPut instantiates a new TargetGroupPut object @@ -45,152 +45,152 @@ func NewTargetGroupPutWithDefaults() *TargetGroupPut { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupPut) GetId() *string { +// 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.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 *TargetGroupPut) GetIdOk() (*string, bool) { +func (o *TargetGroupPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Href, true } -// SetId sets field value -func (o *TargetGroupPut) SetId(v string) { +// SetHref sets field value +func (o *TargetGroupPut) SetHref(v string) { - o.Id = &v + o.Href = &v } -// HasId returns a boolean if a field has been set. -func (o *TargetGroupPut) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *TargetGroupPut) GetType() *Type { +// 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.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 *TargetGroupPut) GetTypeOk() (*Type, bool) { +func (o *TargetGroupPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Id, true } -// SetType sets field value -func (o *TargetGroupPut) SetType(v Type) { +// SetId sets field value +func (o *TargetGroupPut) SetId(v string) { - o.Type = &v + o.Id = &v } -// HasType returns a boolean if a field has been set. -func (o *TargetGroupPut) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroupPut) GetHref() *string { +// 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.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 *TargetGroupPut) GetHrefOk() (*string, bool) { +func (o *TargetGroupPut) GetPropertiesOk() (*TargetGroupProperties, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Properties, true } -// SetHref sets field value -func (o *TargetGroupPut) SetHref(v string) { +// SetProperties sets field value +func (o *TargetGroupPut) SetProperties(v TargetGroupProperties) { - o.Href = &v + o.Properties = &v } -// HasHref returns a boolean if a field has been set. -func (o *TargetGroupPut) HasHref() bool { - if o != nil && o.Href != nil { +// 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 } -// GetProperties returns the Properties field value -// If the value is explicit nil, the zero value for TargetGroupProperties will be returned -func (o *TargetGroupPut) GetProperties() *TargetGroupProperties { +// 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.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 *TargetGroupPut) GetPropertiesOk() (*TargetGroupProperties, bool) { +func (o *TargetGroupPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Properties, true + return o.Type, true } -// SetProperties sets field value -func (o *TargetGroupPut) SetProperties(v TargetGroupProperties) { +// SetType sets field value +func (o *TargetGroupPut) SetType(v Type) { - o.Properties = &v + o.Type = &v } -// HasProperties returns a boolean if a field has been set. -func (o *TargetGroupPut) HasProperties() bool { - if o != nil && o.Properties != nil { +// HasType returns a boolean if a field has been set. +func (o *TargetGroupPut) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -199,18 +199,22 @@ func (o *TargetGroupPut) HasProperties() bool { func (o TargetGroupPut) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_target.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_target.go index 58f95f13..6681dd25 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_target.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_group_target.go @@ -16,16 +16,18 @@ import ( // TargetGroupTarget struct for TargetGroupTarget type TargetGroupTarget struct { - // 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 use values in the middle of the range to leave room for later adjustments. - Weight *int32 `json:"weight"` // 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 @@ -38,6 +40,8 @@ func NewTargetGroupTarget(ip string, port int32, weight int32) *TargetGroupTarge this.Ip = &ip this.Port = &port this.Weight = &weight + var proxyProtocol string = "none" + this.ProxyProtocol = &proxyProtocol return &this } @@ -47,11 +51,51 @@ func NewTargetGroupTarget(ip string, port int32, weight int32) *TargetGroupTarge // 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, the zero value for string will be returned +// If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetIp() *string { if o == nil { return nil @@ -88,152 +132,152 @@ func (o *TargetGroupTarget) HasIp() bool { return false } -// GetPort returns the Port field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TargetGroupTarget) GetPort() *int32 { +// 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.Port + return o.MaintenanceEnabled } -// GetPortOk returns a tuple with the Port field value +// 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) GetPortOk() (*int32, bool) { +func (o *TargetGroupTarget) GetMaintenanceEnabledOk() (*bool, bool) { if o == nil { return nil, false } - return o.Port, true + return o.MaintenanceEnabled, true } -// SetPort sets field value -func (o *TargetGroupTarget) SetPort(v int32) { +// SetMaintenanceEnabled sets field value +func (o *TargetGroupTarget) SetMaintenanceEnabled(v bool) { - o.Port = &v + o.MaintenanceEnabled = &v } -// HasPort returns a boolean if a field has been set. -func (o *TargetGroupTarget) HasPort() bool { - if o != nil && o.Port != nil { +// 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 } -// GetWeight returns the Weight field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *TargetGroupTarget) GetWeight() *int32 { +// 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.Weight + return o.Port } -// GetWeightOk returns a tuple with the Weight field value +// 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) GetWeightOk() (*int32, bool) { +func (o *TargetGroupTarget) GetPortOk() (*int32, bool) { if o == nil { return nil, false } - return o.Weight, true + return o.Port, true } -// SetWeight sets field value -func (o *TargetGroupTarget) SetWeight(v int32) { +// SetPort sets field value +func (o *TargetGroupTarget) SetPort(v int32) { - o.Weight = &v + o.Port = &v } -// HasWeight returns a boolean if a field has been set. -func (o *TargetGroupTarget) HasWeight() bool { - if o != nil && o.Weight != nil { +// 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 } -// GetHealthCheckEnabled returns the HealthCheckEnabled field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *TargetGroupTarget) GetHealthCheckEnabled() *bool { +// 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.HealthCheckEnabled + return o.Weight } -// GetHealthCheckEnabledOk returns a tuple with the HealthCheckEnabled field value +// 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) GetHealthCheckEnabledOk() (*bool, bool) { +func (o *TargetGroupTarget) GetWeightOk() (*int32, bool) { if o == nil { return nil, false } - return o.HealthCheckEnabled, true + return o.Weight, true } -// SetHealthCheckEnabled sets field value -func (o *TargetGroupTarget) SetHealthCheckEnabled(v bool) { +// SetWeight sets field value +func (o *TargetGroupTarget) SetWeight(v int32) { - o.HealthCheckEnabled = &v + o.Weight = &v } -// HasHealthCheckEnabled returns a boolean if a field has been set. -func (o *TargetGroupTarget) HasHealthCheckEnabled() bool { - if o != nil && o.HealthCheckEnabled != nil { +// 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 } -// GetMaintenanceEnabled returns the MaintenanceEnabled field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *TargetGroupTarget) GetMaintenanceEnabled() *bool { +// 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.MaintenanceEnabled + return o.ProxyProtocol } -// GetMaintenanceEnabledOk returns a tuple with the MaintenanceEnabled 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 *TargetGroupTarget) GetMaintenanceEnabledOk() (*bool, bool) { +func (o *TargetGroupTarget) GetProxyProtocolOk() (*string, bool) { if o == nil { return nil, false } - return o.MaintenanceEnabled, true + return o.ProxyProtocol, true } -// SetMaintenanceEnabled sets field value -func (o *TargetGroupTarget) SetMaintenanceEnabled(v bool) { +// SetProxyProtocol sets field value +func (o *TargetGroupTarget) SetProxyProtocol(v string) { - o.MaintenanceEnabled = &v + o.ProxyProtocol = &v } -// HasMaintenanceEnabled returns a boolean if a field has been set. -func (o *TargetGroupTarget) HasMaintenanceEnabled() bool { - if o != nil && o.MaintenanceEnabled != nil { +// HasProxyProtocol returns a boolean if a field has been set. +func (o *TargetGroupTarget) HasProxyProtocol() bool { + if o != nil && o.ProxyProtocol != nil { return true } @@ -242,21 +286,30 @@ func (o *TargetGroupTarget) HasMaintenanceEnabled() bool { 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.HealthCheckEnabled != nil { - toSerialize["healthCheckEnabled"] = o.HealthCheckEnabled - } - if o.MaintenanceEnabled != nil { - toSerialize["maintenanceEnabled"] = o.MaintenanceEnabled + + if o.ProxyProtocol != nil { + toSerialize["proxyProtocol"] = o.ProxyProtocol } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_groups.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_groups.go index 8daf0d5c..521ca7b3 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_groups.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_groups.go @@ -16,19 +16,19 @@ import ( // 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"` - // 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 *[]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 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"` } // NewTargetGroups instantiates a new TargetGroups object @@ -49,114 +49,114 @@ func NewTargetGroupsWithDefaults() *TargetGroups { return &this } -// GetId returns the Id field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroups) GetId() *string { +// 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.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 *TargetGroups) GetIdOk() (*string, bool) { +func (o *TargetGroups) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } - return o.Id, true + return o.Links, true } -// SetId sets field value -func (o *TargetGroups) SetId(v string) { +// SetLinks sets field value +func (o *TargetGroups) SetLinks(v PaginationLinks) { - o.Id = &v + o.Links = &v } -// HasId returns a boolean if a field has been set. -func (o *TargetGroups) HasId() bool { - if o != nil && o.Id != nil { +// 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 } -// GetType returns the Type field value -// If the value is explicit nil, the zero value for Type will be returned -func (o *TargetGroups) GetType() *Type { +// 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.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 *TargetGroups) GetTypeOk() (*Type, bool) { +func (o *TargetGroups) GetHrefOk() (*string, bool) { if o == nil { return nil, false } - return o.Type, true + return o.Href, true } -// SetType sets field value -func (o *TargetGroups) SetType(v Type) { +// SetHref sets field value +func (o *TargetGroups) SetHref(v string) { - o.Type = &v + o.Href = &v } -// HasType returns a boolean if a field has been set. -func (o *TargetGroups) HasType() bool { - if o != nil && o.Type != nil { +// 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 } -// GetHref returns the Href field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TargetGroups) GetHref() *string { +// 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.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 *TargetGroups) GetHrefOk() (*string, bool) { +func (o *TargetGroups) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Href, true + return o.Id, true } -// SetHref sets field value -func (o *TargetGroups) SetHref(v string) { +// SetId sets field value +func (o *TargetGroups) SetId(v string) { - o.Href = &v + o.Id = &v } -// HasHref returns a boolean if a field has been set. -func (o *TargetGroups) HasHref() bool { - if o != nil && o.Href != nil { +// HasId returns a boolean if a field has been set. +func (o *TargetGroups) HasId() bool { + if o != nil && o.Id != nil { return true } @@ -164,7 +164,7 @@ func (o *TargetGroups) HasHref() bool { } // GetItems returns the Items field value -// If the value is explicit nil, the zero value for []TargetGroup will be returned +// If the value is explicit nil, nil is returned func (o *TargetGroups) GetItems() *[]TargetGroup { if o == nil { return nil @@ -201,114 +201,114 @@ func (o *TargetGroups) 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 *TargetGroups) GetOffset() *float32 { +// 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.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 *TargetGroups) GetOffsetOk() (*float32, bool) { +func (o *TargetGroups) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } - return o.Offset, true + return o.Limit, true } -// SetOffset sets field value -func (o *TargetGroups) SetOffset(v float32) { +// SetLimit sets field value +func (o *TargetGroups) SetLimit(v float32) { - o.Offset = &v + o.Limit = &v } -// HasOffset returns a boolean if a field has been set. -func (o *TargetGroups) HasOffset() bool { - if o != nil && o.Offset != nil { +// 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 } -// GetLimit returns the Limit field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *TargetGroups) GetLimit() *float32 { +// 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.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 *TargetGroups) GetLimitOk() (*float32, bool) { +func (o *TargetGroups) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } - return o.Limit, true + return o.Offset, true } -// SetLimit sets field value -func (o *TargetGroups) SetLimit(v float32) { +// SetOffset sets field value +func (o *TargetGroups) SetOffset(v float32) { - o.Limit = &v + o.Offset = &v } -// HasLimit returns a boolean if a field has been set. -func (o *TargetGroups) HasLimit() bool { - if o != nil && o.Limit != nil { +// 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 } -// GetLinks returns the Links field value -// If the value is explicit nil, the zero value for PaginationLinks will be returned -func (o *TargetGroups) GetLinks() *PaginationLinks { +// 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.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 *TargetGroups) GetLinksOk() (*PaginationLinks, bool) { +func (o *TargetGroups) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } - return o.Links, true + return o.Type, true } -// SetLinks sets field value -func (o *TargetGroups) SetLinks(v PaginationLinks) { +// SetType sets field value +func (o *TargetGroups) SetType(v Type) { - o.Links = &v + o.Type = &v } -// HasLinks returns a boolean if a field has been set. -func (o *TargetGroups) HasLinks() bool { - if o != nil && o.Links != nil { +// HasType returns a boolean if a field has been set. +func (o *TargetGroups) HasType() bool { + if o != nil && o.Type != nil { return true } @@ -317,27 +317,34 @@ func (o *TargetGroups) HasLinks() bool { func (o TargetGroups) 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/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_port_range.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_port_range.go index 9a1c39ea..8c5281ed 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_target_port_range.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_template.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_template.go index 709587e9..ad290d40 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_template.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_template_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_template_properties.go index 4784c610..98d11501 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_template_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_templates.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_templates.go index d849d16c..c66eac10 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_templates.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_token.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_token.go index 074e07ad..c886b268 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_token.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user.go index 14864be6..38d1a9b0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_metadata.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_metadata.go index da90dc00..de6738d7 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_metadata.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_post.go index 912dc339..cfbe9143 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties.go index 6ff0ff0f..7fadd2b4 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties_post.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties_post.go index 463eb6dc..fb4e9026 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties_post.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties_put.go index 778c3b0c..d0ad9294 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_properties_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_put.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_put.go index b45261f2..9e0c992c 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_user_put.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_users.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_users.go index 0107d029..e67610e1 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_users.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_users_entities.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_users_entities.go index 6c10d5a0..7619f661 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_users_entities.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume.go index 52f4eca7..59bf03f0 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume_properties.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume_properties.go index e5ffe9c9..6f6bc6b9 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume_properties.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/model_volume_properties.go @@ -16,49 +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"` - // 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. - BootOrder *string `json:"bootOrder,omitempty"` } // NewVolumeProperties instantiates a new VolumeProperties object @@ -68,9 +69,9 @@ type VolumeProperties struct { func NewVolumeProperties(size float32) *VolumeProperties { this := VolumeProperties{} - this.Size = &size - var bootOrder string = "AUTO" + var bootOrder = "AUTO" this.BootOrder = &bootOrder + this.Size = &size return &this } @@ -80,841 +81,846 @@ func NewVolumeProperties(size float32) *VolumeProperties { // but it doesn't guarantee that properties required by API are set func NewVolumePropertiesWithDefaults() *VolumeProperties { this := VolumeProperties{} - var bootOrder string = "AUTO" + 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 } -// GetRamHotPlugOk returns a tuple with the RamHotPlug field value +// 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) GetRamHotPlugOk() (*bool, bool) { +func (o *VolumeProperties) GetImagePasswordOk() (*string, bool) { if o == nil { return nil, false } - return o.RamHotPlug, true + return o.ImagePassword, true } -// SetRamHotPlug sets field value -func (o *VolumeProperties) SetRamHotPlug(v bool) { +// SetImagePassword sets field value +func (o *VolumeProperties) SetImagePassword(v string) { - o.RamHotPlug = &v + o.ImagePassword = &v } -// HasRamHotPlug returns a boolean if a field has been set. -func (o *VolumeProperties) HasRamHotPlug() bool { - if o != nil && o.RamHotPlug != nil { +// 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 } -// GetNicHotPlug returns the NicHotPlug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *VolumeProperties) GetNicHotPlug() *bool { +// 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.NicHotPlug + return o.LicenceType } -// GetNicHotPlugOk returns a tuple with the NicHotPlug 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 *VolumeProperties) GetNicHotPlugOk() (*bool, bool) { +func (o *VolumeProperties) GetLicenceTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.NicHotPlug, true + return o.LicenceType, true } -// SetNicHotPlug sets field value -func (o *VolumeProperties) SetNicHotPlug(v bool) { +// SetLicenceType sets field value +func (o *VolumeProperties) SetLicenceType(v string) { - o.NicHotPlug = &v + o.LicenceType = &v } -// HasNicHotPlug returns a boolean if a field has been set. -func (o *VolumeProperties) HasNicHotPlug() bool { - if o != nil && o.NicHotPlug != nil { +// 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 } -// GetNicHotUnplug returns the NicHotUnplug field value -// If the value is explicit nil, the zero value for bool will be returned -func (o *VolumeProperties) GetNicHotUnplug() *bool { +// 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.NicHotUnplug + return o.Name } -// GetNicHotUnplugOk returns a tuple with the NicHotUnplug 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) GetNicHotUnplugOk() (*bool, bool) { +func (o *VolumeProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return o.NicHotUnplug, true + return o.Name, true } -// SetNicHotUnplug sets field value -func (o *VolumeProperties) SetNicHotUnplug(v bool) { +// SetName sets field value +func (o *VolumeProperties) SetName(v string) { - o.NicHotUnplug = &v + o.Name = &v } -// HasNicHotUnplug returns a boolean if a field has been set. -func (o *VolumeProperties) HasNicHotUnplug() bool { - if o != nil && o.NicHotUnplug != nil { +// HasName returns a boolean if a field has been set. +func (o *VolumeProperties) HasName() bool { + if o != nil && o.Name != 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 *VolumeProperties) GetDiscVirtioHotPlug() *bool { +// GetNicHotPlug returns the NicHotPlug field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetNicHotPlug() *bool { if o == nil { return nil } - return o.DiscVirtioHotPlug + return o.NicHotPlug } -// GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug 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 *VolumeProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { +func (o *VolumeProperties) GetNicHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotPlug, true + return o.NicHotPlug, true } -// SetDiscVirtioHotPlug sets field value -func (o *VolumeProperties) SetDiscVirtioHotPlug(v bool) { +// SetNicHotPlug sets field value +func (o *VolumeProperties) SetNicHotPlug(v bool) { - o.DiscVirtioHotPlug = &v + o.NicHotPlug = &v } -// HasDiscVirtioHotPlug returns a boolean if a field has been set. -func (o *VolumeProperties) HasDiscVirtioHotPlug() bool { - if o != nil && o.DiscVirtioHotPlug != nil { +// HasNicHotPlug returns a boolean if a field has been set. +func (o *VolumeProperties) HasNicHotPlug() bool { + if o != nil && o.NicHotPlug != 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 { +// GetNicHotUnplug returns the NicHotUnplug field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetNicHotUnplug() *bool { if o == nil { return nil } - return o.DiscVirtioHotUnplug + return o.NicHotUnplug } -// GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug 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 *VolumeProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { +func (o *VolumeProperties) GetNicHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } - return o.DiscVirtioHotUnplug, true + return o.NicHotUnplug, true } -// SetDiscVirtioHotUnplug sets field value -func (o *VolumeProperties) SetDiscVirtioHotUnplug(v bool) { +// SetNicHotUnplug sets field value +func (o *VolumeProperties) SetNicHotUnplug(v bool) { - o.DiscVirtioHotUnplug = &v + o.NicHotUnplug = &v } -// HasDiscVirtioHotUnplug returns a boolean if a field has been set. -func (o *VolumeProperties) HasDiscVirtioHotUnplug() bool { - if o != nil && o.DiscVirtioHotUnplug != nil { +// HasNicHotUnplug returns a boolean if a field has been set. +func (o *VolumeProperties) HasNicHotUnplug() bool { + if o != nil && o.NicHotUnplug != 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 { +// 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.DeviceNumber + return o.PciSlot } -// GetDeviceNumberOk returns a tuple with the DeviceNumber 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) GetDeviceNumberOk() (*int64, bool) { +func (o *VolumeProperties) GetPciSlotOk() (*int32, bool) { if o == nil { return nil, false } - return o.DeviceNumber, true + return o.PciSlot, true } -// SetDeviceNumber sets field value -func (o *VolumeProperties) SetDeviceNumber(v int64) { +// SetPciSlot sets field value +func (o *VolumeProperties) SetPciSlot(v int32) { - o.DeviceNumber = &v + o.PciSlot = &v } -// HasDeviceNumber returns a boolean if a field has been set. -func (o *VolumeProperties) HasDeviceNumber() bool { - if o != nil && o.DeviceNumber != 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 } -// 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 { +// 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.PciSlot + return o.RamHotPlug } -// GetPciSlotOk returns a tuple with the PciSlot 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) GetPciSlotOk() (*int32, bool) { +func (o *VolumeProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } - return o.PciSlot, true + return o.RamHotPlug, true } -// SetPciSlot sets field value -func (o *VolumeProperties) SetPciSlot(v int32) { +// SetRamHotPlug sets field value +func (o *VolumeProperties) SetRamHotPlug(v bool) { - o.PciSlot = &v + o.RamHotPlug = &v } -// HasPciSlot returns a boolean if a field has been set. -func (o *VolumeProperties) HasPciSlot() bool { - if o != nil && o.PciSlot != 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 } -// 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 { +// 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.BackupunitId + return o.Size } -// GetBackupunitIdOk returns a tuple with the BackupunitId 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) GetBackupunitIdOk() (*string, bool) { +func (o *VolumeProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } - return o.BackupunitId, true + return o.Size, true } -// SetBackupunitId sets field value -func (o *VolumeProperties) SetBackupunitId(v string) { +// SetSize sets field value +func (o *VolumeProperties) SetSize(v float32) { - o.BackupunitId = &v + o.Size = &v } -// HasBackupunitId returns a boolean if a field has been set. -func (o *VolumeProperties) HasBackupunitId() bool { - if o != nil && o.BackupunitId != 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 } -// GetUserData returns the UserData field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetUserData() *string { +// 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.UserData + return o.SshKeys } -// GetUserDataOk returns a tuple with the UserData 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) GetUserDataOk() (*string, bool) { +func (o *VolumeProperties) GetSshKeysOk() (*[]string, bool) { if o == nil { return nil, false } - return o.UserData, true + return o.SshKeys, true } -// SetUserData sets field value -func (o *VolumeProperties) SetUserData(v string) { +// SetSshKeys sets field value +func (o *VolumeProperties) SetSshKeys(v []string) { - o.UserData = &v + o.SshKeys = &v } -// HasUserData returns a boolean if a field has been set. -func (o *VolumeProperties) HasUserData() bool { - if o != nil && o.UserData != 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 } -// 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 { +// 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.BootServer + return o.Type } -// GetBootServerOk returns a tuple with the BootServer 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) GetBootServerOk() (*string, bool) { +func (o *VolumeProperties) GetTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.BootServer, true + return o.Type, true } -// SetBootServer sets field value -func (o *VolumeProperties) SetBootServer(v string) { +// SetType sets field value +func (o *VolumeProperties) SetType(v string) { - o.BootServer = &v + o.Type = &v } -// HasBootServer returns a boolean if a field has been set. -func (o *VolumeProperties) HasBootServer() bool { - if o != nil && o.BootServer != nil { +// HasType returns a boolean if a field has been set. +func (o *VolumeProperties) HasType() bool { + if o != nil && o.Type != nil { return true } return false } -// GetBootOrder returns the BootOrder field value -// If the value is explicit nil, the zero value for string will be returned -func (o *VolumeProperties) GetBootOrder() *string { +// GetUserData returns the UserData field value +// If the value is explicit nil, nil is returned +func (o *VolumeProperties) GetUserData() *string { if o == nil { return nil } - return o.BootOrder + return o.UserData } -// GetBootOrderOk returns a tuple with the BootOrder field value +// GetUserDataOk returns a tuple with the UserData field value // and a 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) GetBootOrderOk() (*string, bool) { +func (o *VolumeProperties) GetUserDataOk() (*string, bool) { if o == nil { return nil, false } - return o.BootOrder, true + return o.UserData, true } -// SetBootOrder sets field value -func (o *VolumeProperties) SetBootOrder(v string) { +// SetUserData sets field value +func (o *VolumeProperties) SetUserData(v string) { - o.BootOrder = &v + o.UserData = &v } -// HasBootOrder returns a boolean if a field has been set. -func (o *VolumeProperties) HasBootOrder() bool { - if o != nil && o.BootOrder != nil { +// HasUserData returns a boolean if a field has been set. +func (o *VolumeProperties) HasUserData() bool { + if o != nil && o.UserData != nil { return true } @@ -923,72 +929,95 @@ func (o *VolumeProperties) HasBootOrder() bool { func (o VolumeProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name + if o.AvailabilityZone != nil { + toSerialize["availabilityZone"] = o.AvailabilityZone } - if o.Type != nil { - toSerialize["type"] = o.Type + + if o.BackupunitId != nil { + toSerialize["backupunitId"] = o.BackupunitId } - if o.Size != nil { - toSerialize["size"] = o.Size + + if o.BootOrder == &Nilstring { + toSerialize["bootOrder"] = nil + } else if o.BootOrder != nil { + toSerialize["bootOrder"] = o.BootOrder } - if o.AvailabilityZone != nil { - toSerialize["availabilityZone"] = o.AvailabilityZone + if o.BootServer != nil { + toSerialize["bootServer"] = o.BootServer + } + + if o.Bus != nil { + toSerialize["bus"] = o.Bus + } + + if o.CpuHotPlug != nil { + toSerialize["cpuHotPlug"] = o.CpuHotPlug + } + + if o.DeviceNumber != nil { + toSerialize["deviceNumber"] = o.DeviceNumber } + + if o.DiscVirtioHotPlug != nil { + toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug + } + + 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 - } - if o.BootOrder != nil { - toSerialize["bootOrder"] = o.BootOrder - } + return json.Marshal(toSerialize) } diff --git a/vendor/github.com/ionos-cloud/sdk-go/v6/model_volumes.go b/vendor/github.com/ionos-cloud/sdk-go/v6/model_volumes.go index dfe753d8..ec795374 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/model_volumes.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/ionos-cloud/sdk-go/v6/utils.go b/vendor/github.com/ionos-cloud/sdk-go/v6/utils.go index aa9652cd..08c0967d 100644 --- a/vendor/github.com/ionos-cloud/sdk-go/v6/utils.go +++ b/vendor/github.com/ionos-cloud/sdk-go/v6/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/vendor/github.com/moby/term/doc.go b/vendor/github.com/moby/term/doc.go new file mode 100644 index 00000000..c9bc0324 --- /dev/null +++ b/vendor/github.com/moby/term/doc.go @@ -0,0 +1,3 @@ +// Package term provides structures and helper functions to work with +// terminal (state, sizes). +package term diff --git a/vendor/github.com/moby/term/tc.go b/vendor/github.com/moby/term/tc.go deleted file mode 100644 index 8a5e09f5..00000000 --- a/vendor/github.com/moby/term/tc.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build !windows -// +build !windows - -package term - -import ( - "golang.org/x/sys/unix" -) - -func tcget(fd uintptr) (*Termios, error) { - p, err := unix.IoctlGetTermios(int(fd), getTermios) - if err != nil { - return nil, err - } - return p, nil -} - -func tcset(fd uintptr, p *Termios) error { - return unix.IoctlSetTermios(int(fd), setTermios, p) -} diff --git a/vendor/github.com/moby/term/term.go b/vendor/github.com/moby/term/term.go index 8c1fc1b5..f9d8988e 100644 --- a/vendor/github.com/moby/term/term.go +++ b/vendor/github.com/moby/term/term.go @@ -1,119 +1,85 @@ -//go:build !windows -// +build !windows - -// Package term provides structures and helper functions to work with -// terminal (state, sizes). package term -import ( - "errors" - "fmt" - "io" - "os" - "os/signal" - - "golang.org/x/sys/unix" -) +import "io" -// ErrInvalidState is returned if the state of the terminal is invalid. -var ErrInvalidState = errors.New("Invalid terminal state") - -// State represents the state of the terminal. -type State struct { - termios Termios -} +// State holds the platform-specific state / console mode for the terminal. +type State terminalState // Winsize represents the size of the terminal window. type Winsize struct { Height uint16 Width uint16 - x uint16 - y uint16 + + // Only used on Unix + x uint16 + y uint16 } // StdStreams returns the standard streams (stdin, stdout, stderr). +// +// On Windows, it attempts to turn on VT handling on all std handles if +// supported, or falls back to terminal emulation. On Unix, this returns +// the standard [os.Stdin], [os.Stdout] and [os.Stderr]. func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { - return os.Stdin, os.Stdout, os.Stderr + return stdStreams() } // GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. -func GetFdInfo(in interface{}) (uintptr, bool) { - var inFd uintptr - var isTerminalIn bool - if file, ok := in.(*os.File); ok { - inFd = file.Fd() - isTerminalIn = IsTerminal(inFd) - } - return inFd, isTerminalIn +func GetFdInfo(in interface{}) (fd uintptr, isTerminal bool) { + return getFdInfo(in) +} + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + return getWinsize(fd) +} + +// SetWinsize tries to set the specified window size for the specified file +// descriptor. It is only implemented on Unix, and returns an error on Windows. +func SetWinsize(fd uintptr, ws *Winsize) error { + return setWinsize(fd, ws) } // IsTerminal returns true if the given file descriptor is a terminal. func IsTerminal(fd uintptr) bool { - _, err := tcget(fd) - return err == nil + return isTerminal(fd) } // RestoreTerminal restores the terminal connected to the given file descriptor // to a previous state. func RestoreTerminal(fd uintptr, state *State) error { - if state == nil { - return ErrInvalidState - } - return tcset(fd, &state.termios) + return restoreTerminal(fd, state) } // SaveState saves the state of the terminal connected to the given file descriptor. func SaveState(fd uintptr) (*State, error) { - termios, err := tcget(fd) - if err != nil { - return nil, err - } - return &State{termios: *termios}, nil + return saveState(fd) } // DisableEcho applies the specified state to the terminal connected to the file // descriptor, with echo disabled. func DisableEcho(fd uintptr, state *State) error { - newState := state.termios - newState.Lflag &^= unix.ECHO - - if err := tcset(fd, &newState); err != nil { - return err - } - handleInterrupt(fd, state) - return nil + return disableEcho(fd, state) } // SetRawTerminal puts the terminal connected to the given file descriptor into -// raw mode and returns the previous state. On UNIX, this puts both the input -// and output into raw mode. On Windows, it only puts the input into raw mode. -func SetRawTerminal(fd uintptr) (*State, error) { - oldState, err := MakeRaw(fd) - if err != nil { - return nil, err - } - handleInterrupt(fd, oldState) - return oldState, err +// raw mode and returns the previous state. On UNIX, this is the equivalent of +// [MakeRaw], and puts both the input and output into raw mode. On Windows, it +// only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (previousState *State, err error) { + return setRawTerminal(fd) } // SetRawTerminalOutput puts the output of terminal connected to the given file // descriptor into raw mode. On UNIX, this does nothing and returns nil for the // state. On Windows, it disables LF -> CRLF translation. -func SetRawTerminalOutput(fd uintptr) (*State, error) { - return nil, nil +func SetRawTerminalOutput(fd uintptr) (previousState *State, err error) { + return setRawTerminalOutput(fd) } -func handleInterrupt(fd uintptr, state *State) { - sigchan := make(chan os.Signal, 1) - signal.Notify(sigchan, os.Interrupt) - go func() { - for range sigchan { - // quit cleanly and the new terminal item is on a new line - fmt.Println() - signal.Stop(sigchan) - close(sigchan) - RestoreTerminal(fd, state) - os.Exit(1) - } - }() +// MakeRaw puts the terminal (Windows Console) connected to the +// given file descriptor into raw mode and returns the previous state of +// the terminal so that it can be restored. +func MakeRaw(fd uintptr) (previousState *State, err error) { + return makeRaw(fd) } diff --git a/vendor/github.com/moby/term/term_unix.go b/vendor/github.com/moby/term/term_unix.go new file mode 100644 index 00000000..2ec7706a --- /dev/null +++ b/vendor/github.com/moby/term/term_unix.go @@ -0,0 +1,98 @@ +//go:build !windows +// +build !windows + +package term + +import ( + "errors" + "io" + "os" + + "golang.org/x/sys/unix" +) + +// ErrInvalidState is returned if the state of the terminal is invalid. +// +// Deprecated: ErrInvalidState is no longer used. +var ErrInvalidState = errors.New("Invalid terminal state") + +// terminalState holds the platform-specific state / console mode for the terminal. +type terminalState struct { + termios unix.Termios +} + +func stdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + return os.Stdin, os.Stdout, os.Stderr +} + +func getFdInfo(in interface{}) (uintptr, bool) { + var inFd uintptr + var isTerminalIn bool + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminalIn = isTerminal(inFd) + } + return inFd, isTerminalIn +} + +func getWinsize(fd uintptr) (*Winsize, error) { + uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) + ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} + return ws, err +} + +func setWinsize(fd uintptr, ws *Winsize) error { + return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, &unix.Winsize{ + Row: ws.Height, + Col: ws.Width, + Xpixel: ws.x, + Ypixel: ws.y, + }) +} + +func isTerminal(fd uintptr) bool { + _, err := tcget(fd) + return err == nil +} + +func restoreTerminal(fd uintptr, state *State) error { + if state == nil { + return errors.New("invalid terminal state") + } + return tcset(fd, &state.termios) +} + +func saveState(fd uintptr) (*State, error) { + termios, err := tcget(fd) + if err != nil { + return nil, err + } + return &State{termios: *termios}, nil +} + +func disableEcho(fd uintptr, state *State) error { + newState := state.termios + newState.Lflag &^= unix.ECHO + + return tcset(fd, &newState) +} + +func setRawTerminal(fd uintptr) (*State, error) { + return makeRaw(fd) +} + +func setRawTerminalOutput(fd uintptr) (*State, error) { + return nil, nil +} + +func tcget(fd uintptr) (*unix.Termios, error) { + p, err := unix.IoctlGetTermios(int(fd), getTermios) + if err != nil { + return nil, err + } + return p, nil +} + +func tcset(fd uintptr, p *unix.Termios) error { + return unix.IoctlSetTermios(int(fd), setTermios, p) +} diff --git a/vendor/github.com/moby/term/term_windows.go b/vendor/github.com/moby/term/term_windows.go index 3cdc8edb..81ccff04 100644 --- a/vendor/github.com/moby/term/term_windows.go +++ b/vendor/github.com/moby/term/term_windows.go @@ -1,6 +1,7 @@ package term import ( + "fmt" "io" "os" "os/signal" @@ -9,22 +10,15 @@ import ( "golang.org/x/sys/windows" ) -// State holds the console mode for the terminal. -type State struct { +// terminalState holds the platform-specific state / console mode for the terminal. +type terminalState struct { mode uint32 } -// Winsize is used for window size. -type Winsize struct { - Height uint16 - Width uint16 -} - // vtInputSupported is true if winterm.ENABLE_VIRTUAL_TERMINAL_INPUT is supported by the console var vtInputSupported bool -// StdStreams returns the standard streams (stdin, stdout, stderr). -func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { +func stdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { // Turn on VT handling on all std handles, if possible. This might // fail, in which case we will fall back to terminal emulation. var ( @@ -87,16 +81,14 @@ func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { stdErr = os.Stderr } - return + return stdIn, stdOut, stdErr } -// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. -func GetFdInfo(in interface{}) (uintptr, bool) { +func getFdInfo(in interface{}) (uintptr, bool) { return windowsconsole.GetHandleInfo(in) } -// GetWinsize returns the window size based on the specified file descriptor. -func GetWinsize(fd uintptr) (*Winsize, error) { +func getWinsize(fd uintptr) (*Winsize, error) { var info windows.ConsoleScreenBufferInfo if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { return nil, err @@ -110,21 +102,21 @@ func GetWinsize(fd uintptr) (*Winsize, error) { return winsize, nil } -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal(fd uintptr) bool { +func setWinsize(fd uintptr, ws *Winsize) error { + return fmt.Errorf("not implemented on Windows") +} + +func isTerminal(fd uintptr) bool { var mode uint32 err := windows.GetConsoleMode(windows.Handle(fd), &mode) return err == nil } -// RestoreTerminal restores the terminal connected to the given file descriptor -// to a previous state. -func RestoreTerminal(fd uintptr, state *State) error { +func restoreTerminal(fd uintptr, state *State) error { return windows.SetConsoleMode(windows.Handle(fd), state.mode) } -// SaveState saves the state of the terminal connected to the given file descriptor. -func SaveState(fd uintptr) (*State, error) { +func saveState(fd uintptr) (*State, error) { var mode uint32 if err := windows.GetConsoleMode(windows.Handle(fd), &mode); err != nil { @@ -134,9 +126,8 @@ func SaveState(fd uintptr) (*State, error) { return &State{mode: mode}, nil } -// DisableEcho disables echo for the terminal connected to the given file descriptor. -// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx -func DisableEcho(fd uintptr, state *State) error { +func disableEcho(fd uintptr, state *State) error { + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx mode := state.mode mode &^= windows.ENABLE_ECHO_INPUT mode |= windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT @@ -150,69 +141,27 @@ func DisableEcho(fd uintptr, state *State) error { return nil } -// SetRawTerminal puts the terminal connected to the given file descriptor into -// raw mode and returns the previous state. On UNIX, this puts both the input -// and output into raw mode. On Windows, it only puts the input into raw mode. -func SetRawTerminal(fd uintptr) (*State, error) { - state, err := MakeRaw(fd) +func setRawTerminal(fd uintptr) (*State, error) { + oldState, err := MakeRaw(fd) if err != nil { return nil, err } // Register an interrupt handler to catch and restore prior state - restoreAtInterrupt(fd, state) - return state, err + restoreAtInterrupt(fd, oldState) + return oldState, err } -// SetRawTerminalOutput puts the output of terminal connected to the given file -// descriptor into raw mode. On UNIX, this does nothing and returns nil for the -// state. On Windows, it disables LF -> CRLF translation. -func SetRawTerminalOutput(fd uintptr) (*State, error) { - state, err := SaveState(fd) +func setRawTerminalOutput(fd uintptr) (*State, error) { + oldState, err := saveState(fd) if err != nil { return nil, err } // Ignore failures, since winterm.DISABLE_NEWLINE_AUTO_RETURN might not be supported on this // version of Windows. - _ = windows.SetConsoleMode(windows.Handle(fd), state.mode|windows.DISABLE_NEWLINE_AUTO_RETURN) - return state, err -} - -// MakeRaw puts the terminal (Windows Console) connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be restored. -func MakeRaw(fd uintptr) (*State, error) { - state, err := SaveState(fd) - if err != nil { - return nil, err - } - - mode := state.mode - - // See - // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx - // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx - - // Disable these modes - mode &^= windows.ENABLE_ECHO_INPUT - mode &^= windows.ENABLE_LINE_INPUT - mode &^= windows.ENABLE_MOUSE_INPUT - mode &^= windows.ENABLE_WINDOW_INPUT - mode &^= windows.ENABLE_PROCESSED_INPUT - - // Enable these modes - mode |= windows.ENABLE_EXTENDED_FLAGS - mode |= windows.ENABLE_INSERT_MODE - mode |= windows.ENABLE_QUICK_EDIT_MODE - if vtInputSupported { - mode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT - } - - err = windows.SetConsoleMode(windows.Handle(fd), mode) - if err != nil { - return nil, err - } - return state, nil + _ = windows.SetConsoleMode(windows.Handle(fd), oldState.mode|windows.DISABLE_NEWLINE_AUTO_RETURN) + return oldState, err } func restoreAtInterrupt(fd uintptr, state *State) { diff --git a/vendor/github.com/moby/term/termios.go b/vendor/github.com/moby/term/termios_unix.go similarity index 50% rename from vendor/github.com/moby/term/termios.go rename to vendor/github.com/moby/term/termios_unix.go index 99c0f7de..60c82378 100644 --- a/vendor/github.com/moby/term/termios.go +++ b/vendor/github.com/moby/term/termios_unix.go @@ -8,12 +8,11 @@ import ( ) // Termios is the Unix API for terminal I/O. +// +// Deprecated: use [unix.Termios]. type Termios = unix.Termios -// MakeRaw puts the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -func MakeRaw(fd uintptr) (*State, error) { +func makeRaw(fd uintptr) (*State, error) { termios, err := tcget(fd) if err != nil { return nil, err @@ -21,10 +20,10 @@ func MakeRaw(fd uintptr) (*State, error) { oldState := State{termios: *termios} - termios.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON termios.Oflag &^= unix.OPOST - termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) - termios.Cflag &^= (unix.CSIZE | unix.PARENB) + termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN + termios.Cflag &^= unix.CSIZE | unix.PARENB termios.Cflag |= unix.CS8 termios.Cc[unix.VMIN] = 1 termios.Cc[unix.VTIME] = 0 diff --git a/vendor/github.com/moby/term/termios_windows.go b/vendor/github.com/moby/term/termios_windows.go new file mode 100644 index 00000000..5be4e760 --- /dev/null +++ b/vendor/github.com/moby/term/termios_windows.go @@ -0,0 +1,37 @@ +package term + +import "golang.org/x/sys/windows" + +func makeRaw(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + mode := state.mode + + // See + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx + + // Disable these modes + mode &^= windows.ENABLE_ECHO_INPUT + mode &^= windows.ENABLE_LINE_INPUT + mode &^= windows.ENABLE_MOUSE_INPUT + mode &^= windows.ENABLE_WINDOW_INPUT + mode &^= windows.ENABLE_PROCESSED_INPUT + + // Enable these modes + mode |= windows.ENABLE_EXTENDED_FLAGS + mode |= windows.ENABLE_INSERT_MODE + mode |= windows.ENABLE_QUICK_EDIT_MODE + if vtInputSupported { + mode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT + } + + err = windows.SetConsoleMode(windows.Handle(fd), mode) + if err != nil { + return nil, err + } + return state, nil +} diff --git a/vendor/github.com/moby/term/windows/ansi_reader.go b/vendor/github.com/moby/term/windows/ansi_reader.go index f32aa537..fb34c547 100644 --- a/vendor/github.com/moby/term/windows/ansi_reader.go +++ b/vendor/github.com/moby/term/windows/ansi_reader.go @@ -195,10 +195,10 @@ func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) stri // +Key generates ESC N Key if !control && alt { - return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar)) + return ansiterm.KEY_ESC_N + strings.ToLower(string(rune(keyEvent.UnicodeChar))) } - return string(keyEvent.UnicodeChar) + return string(rune(keyEvent.UnicodeChar)) } // formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. diff --git a/vendor/github.com/moby/term/windows/console.go b/vendor/github.com/moby/term/windows/console.go index 116b74e8..21e57bd5 100644 --- a/vendor/github.com/moby/term/windows/console.go +++ b/vendor/github.com/moby/term/windows/console.go @@ -30,8 +30,11 @@ func GetHandleInfo(in interface{}) (uintptr, bool) { // IsConsole returns true if the given file descriptor is a Windows Console. // The code assumes that GetConsoleMode will return an error for file descriptors that are not a console. -// Deprecated: use golang.org/x/sys/windows.GetConsoleMode() or golang.org/x/term.IsTerminal() -var IsConsole = isConsole +// +// Deprecated: use [windows.GetConsoleMode] or [golang.org/x/term.IsTerminal]. +func IsConsole(fd uintptr) bool { + return isConsole(fd) +} func isConsole(fd uintptr) bool { var mode uint32 diff --git a/vendor/github.com/moby/term/winsize.go b/vendor/github.com/moby/term/winsize.go deleted file mode 100644 index bea8d459..00000000 --- a/vendor/github.com/moby/term/winsize.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build !windows -// +build !windows - -package term - -import ( - "golang.org/x/sys/unix" -) - -// GetWinsize returns the window size based on the specified file descriptor. -func GetWinsize(fd uintptr) (*Winsize, error) { - uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) - ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} - return ws, err -} - -// SetWinsize tries to set the specified window size for the specified file descriptor. -func SetWinsize(fd uintptr, ws *Winsize) error { - uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y} - return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/vendor/github.com/stretchr/testify/assert/assertion_compare.go index 95d8e59d..4d4b4aad 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_compare.go @@ -28,6 +28,8 @@ var ( uint32Type = reflect.TypeOf(uint32(1)) uint64Type = reflect.TypeOf(uint64(1)) + uintptrType = reflect.TypeOf(uintptr(1)) + float32Type = reflect.TypeOf(float32(1)) float64Type = reflect.TypeOf(float64(1)) @@ -308,11 +310,11 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { case reflect.Struct: { // All structs enter here. We're not interested in most types. - if !canConvert(obj1Value, timeType) { + if !obj1Value.CanConvert(timeType) { break } - // time.Time can compared! + // time.Time can be compared! timeObj1, ok := obj1.(time.Time) if !ok { timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time) @@ -328,7 +330,7 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { case reflect.Slice: { // We only care about the []byte type. - if !canConvert(obj1Value, bytesType) { + if !obj1Value.CanConvert(bytesType) { break } @@ -345,6 +347,26 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true } + case reflect.Uintptr: + { + uintptrObj1, ok := obj1.(uintptr) + if !ok { + uintptrObj1 = obj1Value.Convert(uintptrType).Interface().(uintptr) + } + uintptrObj2, ok := obj2.(uintptr) + if !ok { + uintptrObj2 = obj2Value.Convert(uintptrType).Interface().(uintptr) + } + if uintptrObj1 > uintptrObj2 { + return compareGreater, true + } + if uintptrObj1 == uintptrObj2 { + return compareEqual, true + } + if uintptrObj1 < uintptrObj2 { + return compareLess, true + } + } } return compareEqual, false @@ -352,9 +374,9 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { // Greater asserts that the first element is greater than the second // -// assert.Greater(t, 2, 1) -// assert.Greater(t, float64(2), float64(1)) -// assert.Greater(t, "b", "a") +// assert.Greater(t, 2, 1) +// assert.Greater(t, float64(2), float64(1)) +// assert.Greater(t, "b", "a") func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -364,10 +386,10 @@ func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface // GreaterOrEqual asserts that the first element is greater than or equal to the second // -// assert.GreaterOrEqual(t, 2, 1) -// assert.GreaterOrEqual(t, 2, 2) -// assert.GreaterOrEqual(t, "b", "a") -// assert.GreaterOrEqual(t, "b", "b") +// assert.GreaterOrEqual(t, 2, 1) +// assert.GreaterOrEqual(t, 2, 2) +// assert.GreaterOrEqual(t, "b", "a") +// assert.GreaterOrEqual(t, "b", "b") func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -377,9 +399,9 @@ func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...in // Less asserts that the first element is less than the second // -// assert.Less(t, 1, 2) -// assert.Less(t, float64(1), float64(2)) -// assert.Less(t, "a", "b") +// assert.Less(t, 1, 2) +// assert.Less(t, float64(1), float64(2)) +// assert.Less(t, "a", "b") func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -389,10 +411,10 @@ func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) // LessOrEqual asserts that the first element is less than or equal to the second // -// assert.LessOrEqual(t, 1, 2) -// assert.LessOrEqual(t, 2, 2) -// assert.LessOrEqual(t, "a", "b") -// assert.LessOrEqual(t, "b", "b") +// assert.LessOrEqual(t, 1, 2) +// assert.LessOrEqual(t, 2, 2) +// assert.LessOrEqual(t, "a", "b") +// assert.LessOrEqual(t, "b", "b") func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -402,8 +424,8 @@ func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...inter // Positive asserts that the specified element is positive // -// assert.Positive(t, 1) -// assert.Positive(t, 1.23) +// assert.Positive(t, 1) +// assert.Positive(t, 1.23) func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -414,8 +436,8 @@ func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { // Negative asserts that the specified element is negative // -// assert.Negative(t, -1) -// assert.Negative(t, -1.23) +// assert.Negative(t, -1) +// assert.Negative(t, -1.23) func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go deleted file mode 100644 index da867903..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build go1.17 -// +build go1.17 - -// TODO: once support for Go 1.16 is dropped, this file can be -// merged/removed with assertion_compare_go1.17_test.go and -// assertion_compare_legacy.go - -package assert - -import "reflect" - -// Wrapper around reflect.Value.CanConvert, for compatibility -// reasons. -func canConvert(value reflect.Value, to reflect.Type) bool { - return value.CanConvert(to) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go b/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go deleted file mode 100644 index 1701af2a..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !go1.17 -// +build !go1.17 - -// TODO: once support for Go 1.16 is dropped, this file can be -// merged/removed with assertion_compare_go1.17_test.go and -// assertion_compare_can_convert.go - -package assert - -import "reflect" - -// Older versions of Go does not have the reflect.Value.CanConvert -// method. -func canConvert(value reflect.Value, to reflect.Type) bool { - return false -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go index 7880b8f9..3ddab109 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go @@ -1,7 +1,4 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ +// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. package assert @@ -22,9 +19,9 @@ func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bo // Containsf asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // -// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") +// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") +// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") +// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -56,7 +53,7 @@ func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string // Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// assert.Emptyf(t, obj, "error message %s", "formatted") +// assert.Emptyf(t, obj, "error message %s", "formatted") func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -66,7 +63,7 @@ func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) boo // Equalf asserts that two objects are equal. // -// assert.Equalf(t, 123, 123, "error message %s", "formatted") +// assert.Equalf(t, 123, 123, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality @@ -81,8 +78,8 @@ func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, ar // EqualErrorf asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // -// actualObj, err := SomeFunction() -// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") +// actualObj, err := SomeFunction() +// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -90,10 +87,27 @@ func EqualErrorf(t TestingT, theError error, errString string, msg string, args return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) } -// EqualValuesf asserts that two objects are equal or convertable to the same types +// EqualExportedValuesf asserts that the types of two objects are equal and their public +// fields are also equal. This is useful for comparing structs that have private fields +// that could potentially differ. +// +// type S struct { +// Exported int +// notExported int +// } +// assert.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true +// assert.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false +func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...) +} + +// EqualValuesf asserts that two objects are equal or convertible to the same types // and equal. // -// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") +// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -103,10 +117,10 @@ func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg stri // Errorf asserts that a function returned an error (i.e. not `nil`). // -// actualObj, err := SomeFunction() -// if assert.Errorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } +// actualObj, err := SomeFunction() +// if assert.Errorf(t, err, "error message %s", "formatted") { +// assert.Equal(t, expectedErrorf, err) +// } func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -126,8 +140,8 @@ func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...int // ErrorContainsf asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // -// actualObj, err := SomeFunction() -// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") +// actualObj, err := SomeFunction() +// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -147,7 +161,7 @@ func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface // Eventuallyf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // -// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -155,9 +169,34 @@ func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick return Eventually(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) } +// EventuallyWithTf asserts that given condition will be met in waitFor time, +// periodically checking target function each tick. In contrast to Eventually, +// it supplies a CollectT to the condition function, so that the condition +// function can use the CollectT to call other assertions. +// The condition is considered "met" if no errors are raised in a tick. +// The supplied CollectT collects all errors from one tick (if there are any). +// If the condition is not met before waitFor, the collected errors of +// the last tick are copied to t. +// +// externalValue := false +// go func() { +// time.Sleep(8*time.Second) +// externalValue = true +// }() +// assert.EventuallyWithTf(t, func(c *assert.CollectT, "error message %s", "formatted") { +// // add assertions as needed; any assertion failure will fail the current tick +// assert.True(c, externalValue, "expected 'externalValue' to be true") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") +func EventuallyWithTf(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return EventuallyWithT(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) +} + // Exactlyf asserts that two objects are equal in value and type. // -// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") +// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -183,7 +222,7 @@ func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{} // Falsef asserts that the specified value is false. // -// assert.Falsef(t, myBool, "error message %s", "formatted") +// assert.Falsef(t, myBool, "error message %s", "formatted") func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -202,9 +241,9 @@ func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool // Greaterf asserts that the first element is greater than the second // -// assert.Greaterf(t, 2, 1, "error message %s", "formatted") -// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") -// assert.Greaterf(t, "b", "a", "error message %s", "formatted") +// assert.Greaterf(t, 2, 1, "error message %s", "formatted") +// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") +// assert.Greaterf(t, "b", "a", "error message %s", "formatted") func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -214,10 +253,10 @@ func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...in // GreaterOrEqualf asserts that the first element is greater than or equal to the second // -// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") +// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") +// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") +// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") +// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -228,7 +267,7 @@ func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, arg // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // -// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { @@ -241,7 +280,7 @@ func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // -// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { @@ -253,7 +292,7 @@ func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, u // HTTPErrorf asserts that a specified handler returns an error status code. // -// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { @@ -265,7 +304,7 @@ func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, // HTTPRedirectf asserts that a specified handler returns a redirect status code. // -// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { @@ -277,7 +316,7 @@ func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url stri // HTTPStatusCodef asserts that a specified handler returns a specified status code. // -// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") +// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { @@ -289,7 +328,7 @@ func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url st // HTTPSuccessf asserts that a specified handler returns a success status code. // -// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") +// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { @@ -301,7 +340,7 @@ func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url strin // Implementsf asserts that an object is implemented by the specified interface. // -// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") +// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -311,7 +350,7 @@ func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, ms // InDeltaf asserts that the two numerals are within delta of each other. // -// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") +// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -353,9 +392,9 @@ func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsil // IsDecreasingf asserts that the collection is decreasing // -// assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") +// assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") +// assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") +// assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -365,9 +404,9 @@ func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface // IsIncreasingf asserts that the collection is increasing // -// assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") +// assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") +// assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") +// assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -377,9 +416,9 @@ func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface // IsNonDecreasingf asserts that the collection is not decreasing // -// assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") +// assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") +// assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") +// assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -389,9 +428,9 @@ func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interf // IsNonIncreasingf asserts that the collection is not increasing // -// assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") +// assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") +// assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") +// assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -409,7 +448,7 @@ func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg strin // JSONEqf asserts that two JSON strings are equivalent. // -// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") +// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -420,7 +459,7 @@ func JSONEqf(t TestingT, expected string, actual string, msg string, args ...int // Lenf asserts that the specified object has specific length. // Lenf also fails if the object has a type that len() not accept. // -// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") +// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -430,9 +469,9 @@ func Lenf(t TestingT, object interface{}, length int, msg string, args ...interf // Lessf asserts that the first element is less than the second // -// assert.Lessf(t, 1, 2, "error message %s", "formatted") -// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") -// assert.Lessf(t, "a", "b", "error message %s", "formatted") +// assert.Lessf(t, 1, 2, "error message %s", "formatted") +// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") +// assert.Lessf(t, "a", "b", "error message %s", "formatted") func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -442,10 +481,10 @@ func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...inter // LessOrEqualf asserts that the first element is less than or equal to the second // -// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") -// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") +// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") +// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") +// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") +// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -455,8 +494,8 @@ func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args . // Negativef asserts that the specified element is negative // -// assert.Negativef(t, -1, "error message %s", "formatted") -// assert.Negativef(t, -1.23, "error message %s", "formatted") +// assert.Negativef(t, -1, "error message %s", "formatted") +// assert.Negativef(t, -1.23, "error message %s", "formatted") func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -467,7 +506,7 @@ func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool // Neverf asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // -// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -477,7 +516,7 @@ func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time. // Nilf asserts that the specified object is nil. // -// assert.Nilf(t, err, "error message %s", "formatted") +// assert.Nilf(t, err, "error message %s", "formatted") func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -496,10 +535,10 @@ func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool // NoErrorf asserts that a function returned no error (i.e. `nil`). // -// actualObj, err := SomeFunction() -// if assert.NoErrorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } +// actualObj, err := SomeFunction() +// if assert.NoErrorf(t, err, "error message %s", "formatted") { +// assert.Equal(t, expectedObj, actualObj) +// } func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -519,9 +558,9 @@ func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) boo // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // -// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") +// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") +// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") +// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -532,9 +571,9 @@ func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, a // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } +// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { +// assert.Equal(t, "two", obj[1]) +// } func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -544,7 +583,7 @@ func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) // NotEqualf asserts that the specified values are NOT equal. // -// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") +// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). @@ -557,7 +596,7 @@ func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, // NotEqualValuesf asserts that two objects are not equal even when converted to the same type // -// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") +// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -574,9 +613,19 @@ func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interf return NotErrorIs(t, err, target, append([]interface{}{msg}, args...)...) } +// NotImplementsf asserts that an object does not implement the specified interface. +// +// assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") +func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return NotImplements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) +} + // NotNilf asserts that the specified object is not nil. // -// assert.NotNilf(t, err, "error message %s", "formatted") +// assert.NotNilf(t, err, "error message %s", "formatted") func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -586,7 +635,7 @@ func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bo // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. // -// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") +// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -596,8 +645,8 @@ func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bo // NotRegexpf asserts that a specified regexp does not match a string. // -// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") +// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") +// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -607,7 +656,7 @@ func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args .. // NotSamef asserts that two pointers do not reference the same object. // -// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") +// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -618,10 +667,12 @@ func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...) } -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). +// NotSubsetf asserts that the specified list(array, slice...) or map does NOT +// contain all elements given in the specified subset list(array, slice...) or +// map. // -// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") +// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted") +// assert.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -639,7 +690,7 @@ func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { // Panicsf asserts that the code inside the specified PanicTestFunc panics. // -// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") +// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -651,7 +702,7 @@ func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // -// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -662,7 +713,7 @@ func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // -// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -672,8 +723,8 @@ func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg str // Positivef asserts that the specified element is positive // -// assert.Positivef(t, 1, "error message %s", "formatted") -// assert.Positivef(t, 1.23, "error message %s", "formatted") +// assert.Positivef(t, 1, "error message %s", "formatted") +// assert.Positivef(t, 1.23, "error message %s", "formatted") func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -683,8 +734,8 @@ func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool // Regexpf asserts that a specified regexp matches a string. // -// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") +// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") +// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -694,7 +745,7 @@ func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...in // Samef asserts that two pointers reference the same object. // -// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") +// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -705,10 +756,11 @@ func Samef(t TestingT, expected interface{}, actual interface{}, msg string, arg return Same(t, expected, actual, append([]interface{}{msg}, args...)...) } -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). +// Subsetf asserts that the specified list(array, slice...) or map contains all +// elements given in the specified subset list(array, slice...) or map. // -// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") +// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") +// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -718,7 +770,7 @@ func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args // Truef asserts that the specified value is true. // -// assert.Truef(t, myBool, "error message %s", "formatted") +// assert.Truef(t, myBool, "error message %s", "formatted") func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -728,7 +780,7 @@ func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { // WithinDurationf asserts that the two times are within duration delta of each other. // -// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") +// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -738,7 +790,7 @@ func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta tim // WithinRangef asserts that a time is within a time range (inclusive). // -// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") +// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go index 339515b8..a84e09bd 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go @@ -1,7 +1,4 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ +// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. package assert @@ -30,9 +27,9 @@ func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{} // Contains asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") +// a.Contains("Hello World", "World") +// a.Contains(["Hello", "World"], "World") +// a.Contains({"Hello": "World"}, "Hello") func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -43,9 +40,9 @@ func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs .. // Containsf asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") +// a.Containsf("Hello World", "World", "error message %s", "formatted") +// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") +// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -98,7 +95,7 @@ func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg st // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// a.Empty(obj) +// a.Empty(obj) func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -109,7 +106,7 @@ func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { // Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// a.Emptyf(obj, "error message %s", "formatted") +// a.Emptyf(obj, "error message %s", "formatted") func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -119,7 +116,7 @@ func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) // Equal asserts that two objects are equal. // -// a.Equal(123, 123) +// a.Equal(123, 123) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality @@ -134,8 +131,8 @@ func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs // EqualError asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) +// actualObj, err := SomeFunction() +// a.EqualError(err, expectedErrorString) func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -146,8 +143,8 @@ func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ... // EqualErrorf asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") +// actualObj, err := SomeFunction() +// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -155,10 +152,44 @@ func (a *Assertions) EqualErrorf(theError error, errString string, msg string, a return EqualErrorf(a.t, theError, errString, msg, args...) } -// EqualValues asserts that two objects are equal or convertable to the same types +// EqualExportedValues asserts that the types of two objects are equal and their public +// fields are also equal. This is useful for comparing structs that have private fields +// that could potentially differ. +// +// type S struct { +// Exported int +// notExported int +// } +// a.EqualExportedValues(S{1, 2}, S{1, 3}) => true +// a.EqualExportedValues(S{1, 2}, S{2, 3}) => false +func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return EqualExportedValues(a.t, expected, actual, msgAndArgs...) +} + +// EqualExportedValuesf asserts that the types of two objects are equal and their public +// fields are also equal. This is useful for comparing structs that have private fields +// that could potentially differ. +// +// type S struct { +// Exported int +// notExported int +// } +// a.EqualExportedValuesf(S{1, 2}, S{1, 3}, "error message %s", "formatted") => true +// a.EqualExportedValuesf(S{1, 2}, S{2, 3}, "error message %s", "formatted") => false +func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return EqualExportedValuesf(a.t, expected, actual, msg, args...) +} + +// EqualValues asserts that two objects are equal or convertible to the same types // and equal. // -// a.EqualValues(uint32(123), int32(123)) +// a.EqualValues(uint32(123), int32(123)) func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -166,10 +197,10 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn return EqualValues(a.t, expected, actual, msgAndArgs...) } -// EqualValuesf asserts that two objects are equal or convertable to the same types +// EqualValuesf asserts that two objects are equal or convertible to the same types // and equal. // -// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") +// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -179,7 +210,7 @@ func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg // Equalf asserts that two objects are equal. // -// a.Equalf(123, 123, "error message %s", "formatted") +// a.Equalf(123, 123, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality @@ -193,10 +224,10 @@ func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string // Error asserts that a function returned an error (i.e. not `nil`). // -// actualObj, err := SomeFunction() -// if a.Error(err) { -// assert.Equal(t, expectedError, err) -// } +// actualObj, err := SomeFunction() +// if a.Error(err) { +// assert.Equal(t, expectedError, err) +// } func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -225,8 +256,8 @@ func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args .. // ErrorContains asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // -// actualObj, err := SomeFunction() -// a.ErrorContains(err, expectedErrorSubString) +// actualObj, err := SomeFunction() +// a.ErrorContains(err, expectedErrorSubString) func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -237,8 +268,8 @@ func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs . // ErrorContainsf asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // -// actualObj, err := SomeFunction() -// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") +// actualObj, err := SomeFunction() +// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -266,10 +297,10 @@ func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...inter // Errorf asserts that a function returned an error (i.e. not `nil`). // -// actualObj, err := SomeFunction() -// if a.Errorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } +// actualObj, err := SomeFunction() +// if a.Errorf(err, "error message %s", "formatted") { +// assert.Equal(t, expectedErrorf, err) +// } func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -280,7 +311,7 @@ func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { // Eventually asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // -// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) +// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -288,10 +319,60 @@ func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, ti return Eventually(a.t, condition, waitFor, tick, msgAndArgs...) } +// EventuallyWithT asserts that given condition will be met in waitFor time, +// periodically checking target function each tick. In contrast to Eventually, +// it supplies a CollectT to the condition function, so that the condition +// function can use the CollectT to call other assertions. +// The condition is considered "met" if no errors are raised in a tick. +// The supplied CollectT collects all errors from one tick (if there are any). +// If the condition is not met before waitFor, the collected errors of +// the last tick are copied to t. +// +// externalValue := false +// go func() { +// time.Sleep(8*time.Second) +// externalValue = true +// }() +// a.EventuallyWithT(func(c *assert.CollectT) { +// // add assertions as needed; any assertion failure will fail the current tick +// assert.True(c, externalValue, "expected 'externalValue' to be true") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") +func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...) +} + +// EventuallyWithTf asserts that given condition will be met in waitFor time, +// periodically checking target function each tick. In contrast to Eventually, +// it supplies a CollectT to the condition function, so that the condition +// function can use the CollectT to call other assertions. +// The condition is considered "met" if no errors are raised in a tick. +// The supplied CollectT collects all errors from one tick (if there are any). +// If the condition is not met before waitFor, the collected errors of +// the last tick are copied to t. +// +// externalValue := false +// go func() { +// time.Sleep(8*time.Second) +// externalValue = true +// }() +// a.EventuallyWithTf(func(c *assert.CollectT, "error message %s", "formatted") { +// // add assertions as needed; any assertion failure will fail the current tick +// assert.True(c, externalValue, "expected 'externalValue' to be true") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") +func (a *Assertions) EventuallyWithTf(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...) +} + // Eventuallyf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // -// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -301,7 +382,7 @@ func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, t // Exactly asserts that two objects are equal in value and type. // -// a.Exactly(int32(123), int64(123)) +// a.Exactly(int32(123), int64(123)) func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -311,7 +392,7 @@ func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArg // Exactlyf asserts that two objects are equal in value and type. // -// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") +// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -353,7 +434,7 @@ func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{ // False asserts that the specified value is false. // -// a.False(myBool) +// a.False(myBool) func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -363,7 +444,7 @@ func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { // Falsef asserts that the specified value is false. // -// a.Falsef(myBool, "error message %s", "formatted") +// a.Falsef(myBool, "error message %s", "formatted") func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -391,9 +472,9 @@ func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) b // Greater asserts that the first element is greater than the second // -// a.Greater(2, 1) -// a.Greater(float64(2), float64(1)) -// a.Greater("b", "a") +// a.Greater(2, 1) +// a.Greater(float64(2), float64(1)) +// a.Greater("b", "a") func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -403,10 +484,10 @@ func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...inter // GreaterOrEqual asserts that the first element is greater than or equal to the second // -// a.GreaterOrEqual(2, 1) -// a.GreaterOrEqual(2, 2) -// a.GreaterOrEqual("b", "a") -// a.GreaterOrEqual("b", "b") +// a.GreaterOrEqual(2, 1) +// a.GreaterOrEqual(2, 2) +// a.GreaterOrEqual("b", "a") +// a.GreaterOrEqual("b", "b") func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -416,10 +497,10 @@ func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs . // GreaterOrEqualf asserts that the first element is greater than or equal to the second // -// a.GreaterOrEqualf(2, 1, "error message %s", "formatted") -// a.GreaterOrEqualf(2, 2, "error message %s", "formatted") -// a.GreaterOrEqualf("b", "a", "error message %s", "formatted") -// a.GreaterOrEqualf("b", "b", "error message %s", "formatted") +// a.GreaterOrEqualf(2, 1, "error message %s", "formatted") +// a.GreaterOrEqualf(2, 2, "error message %s", "formatted") +// a.GreaterOrEqualf("b", "a", "error message %s", "formatted") +// a.GreaterOrEqualf("b", "b", "error message %s", "formatted") func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -429,9 +510,9 @@ func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, // Greaterf asserts that the first element is greater than the second // -// a.Greaterf(2, 1, "error message %s", "formatted") -// a.Greaterf(float64(2), float64(1), "error message %s", "formatted") -// a.Greaterf("b", "a", "error message %s", "formatted") +// a.Greaterf(2, 1, "error message %s", "formatted") +// a.Greaterf(float64(2), float64(1), "error message %s", "formatted") +// a.Greaterf("b", "a", "error message %s", "formatted") func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -442,7 +523,7 @@ func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args . // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // -// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") +// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { @@ -455,7 +536,7 @@ func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, u // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // -// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { @@ -468,7 +549,7 @@ func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // -// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") +// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { @@ -481,7 +562,7 @@ func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // -// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { @@ -493,7 +574,7 @@ func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method strin // HTTPError asserts that a specified handler returns an error status code. // -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { @@ -505,7 +586,7 @@ func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url stri // HTTPErrorf asserts that a specified handler returns an error status code. // -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { @@ -517,7 +598,7 @@ func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url str // HTTPRedirect asserts that a specified handler returns a redirect status code. // -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { @@ -529,7 +610,7 @@ func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url s // HTTPRedirectf asserts that a specified handler returns a redirect status code. // -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { @@ -541,7 +622,7 @@ func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url // HTTPStatusCode asserts that a specified handler returns a specified status code. // -// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) +// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { @@ -553,7 +634,7 @@ func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url // HTTPStatusCodef asserts that a specified handler returns a specified status code. // -// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") +// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { @@ -565,7 +646,7 @@ func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, ur // HTTPSuccess asserts that a specified handler returns a success status code. // -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) +// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { @@ -577,7 +658,7 @@ func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url st // HTTPSuccessf asserts that a specified handler returns a success status code. // -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") +// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { @@ -589,7 +670,7 @@ func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url s // Implements asserts that an object is implemented by the specified interface. // -// a.Implements((*MyInterface)(nil), new(MyObject)) +// a.Implements((*MyInterface)(nil), new(MyObject)) func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -599,7 +680,7 @@ func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, // Implementsf asserts that an object is implemented by the specified interface. // -// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") +// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -609,7 +690,7 @@ func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{} // InDelta asserts that the two numerals are within delta of each other. // -// a.InDelta(math.Pi, 22/7.0, 0.01) +// a.InDelta(math.Pi, 22/7.0, 0.01) func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -651,7 +732,7 @@ func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, del // InDeltaf asserts that the two numerals are within delta of each other. // -// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") +// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -693,9 +774,9 @@ func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilo // IsDecreasing asserts that the collection is decreasing // -// a.IsDecreasing([]int{2, 1, 0}) -// a.IsDecreasing([]float{2, 1}) -// a.IsDecreasing([]string{"b", "a"}) +// a.IsDecreasing([]int{2, 1, 0}) +// a.IsDecreasing([]float{2, 1}) +// a.IsDecreasing([]string{"b", "a"}) func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -705,9 +786,9 @@ func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) // IsDecreasingf asserts that the collection is decreasing // -// a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") -// a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") +// a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") +// a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") +// a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -717,9 +798,9 @@ func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...inter // IsIncreasing asserts that the collection is increasing // -// a.IsIncreasing([]int{1, 2, 3}) -// a.IsIncreasing([]float{1, 2}) -// a.IsIncreasing([]string{"a", "b"}) +// a.IsIncreasing([]int{1, 2, 3}) +// a.IsIncreasing([]float{1, 2}) +// a.IsIncreasing([]string{"a", "b"}) func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -729,9 +810,9 @@ func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) // IsIncreasingf asserts that the collection is increasing // -// a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") -// a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") +// a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") +// a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") +// a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -741,9 +822,9 @@ func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...inter // IsNonDecreasing asserts that the collection is not decreasing // -// a.IsNonDecreasing([]int{1, 1, 2}) -// a.IsNonDecreasing([]float{1, 2}) -// a.IsNonDecreasing([]string{"a", "b"}) +// a.IsNonDecreasing([]int{1, 1, 2}) +// a.IsNonDecreasing([]float{1, 2}) +// a.IsNonDecreasing([]string{"a", "b"}) func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -753,9 +834,9 @@ func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface // IsNonDecreasingf asserts that the collection is not decreasing // -// a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") +// a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") +// a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") +// a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -765,9 +846,9 @@ func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...in // IsNonIncreasing asserts that the collection is not increasing // -// a.IsNonIncreasing([]int{2, 1, 1}) -// a.IsNonIncreasing([]float{2, 1}) -// a.IsNonIncreasing([]string{"b", "a"}) +// a.IsNonIncreasing([]int{2, 1, 1}) +// a.IsNonIncreasing([]float{2, 1}) +// a.IsNonIncreasing([]string{"b", "a"}) func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -777,9 +858,9 @@ func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface // IsNonIncreasingf asserts that the collection is not increasing // -// a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") +// a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") +// a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") +// a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -805,7 +886,7 @@ func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg s // JSONEq asserts that two JSON strings are equivalent. // -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -815,7 +896,7 @@ func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interf // JSONEqf asserts that two JSON strings are equivalent. // -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") +// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -826,7 +907,7 @@ func (a *Assertions) JSONEqf(expected string, actual string, msg string, args .. // Len asserts that the specified object has specific length. // Len also fails if the object has a type that len() not accept. // -// a.Len(mySlice, 3) +// a.Len(mySlice, 3) func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -837,7 +918,7 @@ func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface // Lenf asserts that the specified object has specific length. // Lenf also fails if the object has a type that len() not accept. // -// a.Lenf(mySlice, 3, "error message %s", "formatted") +// a.Lenf(mySlice, 3, "error message %s", "formatted") func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -847,9 +928,9 @@ func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...in // Less asserts that the first element is less than the second // -// a.Less(1, 2) -// a.Less(float64(1), float64(2)) -// a.Less("a", "b") +// a.Less(1, 2) +// a.Less(float64(1), float64(2)) +// a.Less("a", "b") func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -859,10 +940,10 @@ func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interfac // LessOrEqual asserts that the first element is less than or equal to the second // -// a.LessOrEqual(1, 2) -// a.LessOrEqual(2, 2) -// a.LessOrEqual("a", "b") -// a.LessOrEqual("b", "b") +// a.LessOrEqual(1, 2) +// a.LessOrEqual(2, 2) +// a.LessOrEqual("a", "b") +// a.LessOrEqual("b", "b") func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -872,10 +953,10 @@ func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...i // LessOrEqualf asserts that the first element is less than or equal to the second // -// a.LessOrEqualf(1, 2, "error message %s", "formatted") -// a.LessOrEqualf(2, 2, "error message %s", "formatted") -// a.LessOrEqualf("a", "b", "error message %s", "formatted") -// a.LessOrEqualf("b", "b", "error message %s", "formatted") +// a.LessOrEqualf(1, 2, "error message %s", "formatted") +// a.LessOrEqualf(2, 2, "error message %s", "formatted") +// a.LessOrEqualf("a", "b", "error message %s", "formatted") +// a.LessOrEqualf("b", "b", "error message %s", "formatted") func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -885,9 +966,9 @@ func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, ar // Lessf asserts that the first element is less than the second // -// a.Lessf(1, 2, "error message %s", "formatted") -// a.Lessf(float64(1), float64(2), "error message %s", "formatted") -// a.Lessf("a", "b", "error message %s", "formatted") +// a.Lessf(1, 2, "error message %s", "formatted") +// a.Lessf(float64(1), float64(2), "error message %s", "formatted") +// a.Lessf("a", "b", "error message %s", "formatted") func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -897,8 +978,8 @@ func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...i // Negative asserts that the specified element is negative // -// a.Negative(-1) -// a.Negative(-1.23) +// a.Negative(-1) +// a.Negative(-1.23) func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -908,8 +989,8 @@ func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool { // Negativef asserts that the specified element is negative // -// a.Negativef(-1, "error message %s", "formatted") -// a.Negativef(-1.23, "error message %s", "formatted") +// a.Negativef(-1, "error message %s", "formatted") +// a.Negativef(-1.23, "error message %s", "formatted") func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -920,7 +1001,7 @@ func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) b // Never asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // -// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) +// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -931,7 +1012,7 @@ func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick ti // Neverf asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // -// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -941,7 +1022,7 @@ func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick t // Nil asserts that the specified object is nil. // -// a.Nil(err) +// a.Nil(err) func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -951,7 +1032,7 @@ func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { // Nilf asserts that the specified object is nil. // -// a.Nilf(err, "error message %s", "formatted") +// a.Nilf(err, "error message %s", "formatted") func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -979,10 +1060,10 @@ func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) // NoError asserts that a function returned no error (i.e. `nil`). // -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } +// actualObj, err := SomeFunction() +// if a.NoError(err) { +// assert.Equal(t, expectedObj, actualObj) +// } func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -992,10 +1073,10 @@ func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { // NoErrorf asserts that a function returned no error (i.e. `nil`). // -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } +// actualObj, err := SomeFunction() +// if a.NoErrorf(err, "error message %s", "formatted") { +// assert.Equal(t, expectedObj, actualObj) +// } func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1024,9 +1105,9 @@ func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") +// a.NotContains("Hello World", "Earth") +// a.NotContains(["Hello", "World"], "Earth") +// a.NotContains({"Hello": "World"}, "Earth") func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1037,9 +1118,9 @@ func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") +// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") +// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") +// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1050,9 +1131,9 @@ func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg strin // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } +// if a.NotEmpty(obj) { +// assert.Equal(t, "two", obj[1]) +// } func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1063,9 +1144,9 @@ func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) boo // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } +// if a.NotEmptyf(obj, "error message %s", "formatted") { +// assert.Equal(t, "two", obj[1]) +// } func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1075,7 +1156,7 @@ func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface // NotEqual asserts that the specified values are NOT equal. // -// a.NotEqual(obj1, obj2) +// a.NotEqual(obj1, obj2) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). @@ -1088,7 +1169,7 @@ func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndAr // NotEqualValues asserts that two objects are not equal even when converted to the same type // -// a.NotEqualValues(obj1, obj2) +// a.NotEqualValues(obj1, obj2) func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1098,7 +1179,7 @@ func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, ms // NotEqualValuesf asserts that two objects are not equal even when converted to the same type // -// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") +// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1108,7 +1189,7 @@ func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, m // NotEqualf asserts that the specified values are NOT equal. // -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") +// a.NotEqualf(obj1, obj2, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). @@ -1137,9 +1218,29 @@ func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...in return NotErrorIsf(a.t, err, target, msg, args...) } +// NotImplements asserts that an object does not implement the specified interface. +// +// a.NotImplements((*MyInterface)(nil), new(MyObject)) +func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NotImplements(a.t, interfaceObject, object, msgAndArgs...) +} + +// NotImplementsf asserts that an object does not implement the specified interface. +// +// a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") +func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NotImplementsf(a.t, interfaceObject, object, msg, args...) +} + // NotNil asserts that the specified object is not nil. // -// a.NotNil(err) +// a.NotNil(err) func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1149,7 +1250,7 @@ func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool // NotNilf asserts that the specified object is not nil. // -// a.NotNilf(err, "error message %s", "formatted") +// a.NotNilf(err, "error message %s", "formatted") func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1159,7 +1260,7 @@ func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{} // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. // -// a.NotPanics(func(){ RemainCalm() }) +// a.NotPanics(func(){ RemainCalm() }) func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1169,7 +1270,7 @@ func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. // -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") +// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1179,8 +1280,8 @@ func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{} // NotRegexp asserts that a specified regexp does not match a string. // -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") +// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") +// a.NotRegexp("^start", "it's not starting") func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1190,8 +1291,8 @@ func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...in // NotRegexpf asserts that a specified regexp does not match a string. // -// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") +// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") +// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1201,7 +1302,7 @@ func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, arg // NotSame asserts that two pointers do not reference the same object. // -// a.NotSame(ptr1, ptr2) +// a.NotSame(ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1214,7 +1315,7 @@ func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArg // NotSamef asserts that two pointers do not reference the same object. // -// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") +// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1225,10 +1326,12 @@ func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg stri return NotSamef(a.t, expected, actual, msg, args...) } -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). +// NotSubset asserts that the specified list(array, slice...) or map does NOT +// contain all elements given in the specified subset list(array, slice...) or +// map. // -// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") +// a.NotSubset([1, 3, 4], [1, 2]) +// a.NotSubset({"x": 1, "y": 2}, {"z": 3}) func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1236,10 +1339,12 @@ func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs return NotSubset(a.t, list, subset, msgAndArgs...) } -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). +// NotSubsetf asserts that the specified list(array, slice...) or map does NOT +// contain all elements given in the specified subset list(array, slice...) or +// map. // -// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") +// a.NotSubsetf([1, 3, 4], [1, 2], "error message %s", "formatted") +// a.NotSubsetf({"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1265,7 +1370,7 @@ func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bo // Panics asserts that the code inside the specified PanicTestFunc panics. // -// a.Panics(func(){ GoCrazy() }) +// a.Panics(func(){ GoCrazy() }) func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1277,7 +1382,7 @@ func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // -// a.PanicsWithError("crazy error", func(){ GoCrazy() }) +// a.PanicsWithError("crazy error", func(){ GoCrazy() }) func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1289,7 +1394,7 @@ func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndAr // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // -// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1300,7 +1405,7 @@ func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg str // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) +// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1311,7 +1416,7 @@ func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgA // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1321,7 +1426,7 @@ func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg // Panicsf asserts that the code inside the specified PanicTestFunc panics. // -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") +// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1331,8 +1436,8 @@ func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) b // Positive asserts that the specified element is positive // -// a.Positive(1) -// a.Positive(1.23) +// a.Positive(1) +// a.Positive(1.23) func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1342,8 +1447,8 @@ func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool { // Positivef asserts that the specified element is positive // -// a.Positivef(1, "error message %s", "formatted") -// a.Positivef(1.23, "error message %s", "formatted") +// a.Positivef(1, "error message %s", "formatted") +// a.Positivef(1.23, "error message %s", "formatted") func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1353,8 +1458,8 @@ func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) b // Regexp asserts that a specified regexp matches a string. // -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") +// a.Regexp(regexp.MustCompile("start"), "it's starting") +// a.Regexp("start...$", "it's not starting") func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1364,8 +1469,8 @@ func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...inter // Regexpf asserts that a specified regexp matches a string. // -// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") +// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") +// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1375,7 +1480,7 @@ func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args . // Same asserts that two pointers reference the same object. // -// a.Same(ptr1, ptr2) +// a.Same(ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1388,7 +1493,7 @@ func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs . // Samef asserts that two pointers reference the same object. // -// a.Samef(ptr1, ptr2, "error message %s", "formatted") +// a.Samef(ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1399,10 +1504,11 @@ func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, return Samef(a.t, expected, actual, msg, args...) } -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). +// Subset asserts that the specified list(array, slice...) or map contains all +// elements given in the specified subset list(array, slice...) or map. // -// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") +// a.Subset([1, 2, 3], [1, 2]) +// a.Subset({"x": 1, "y": 2}, {"x": 1}) func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1410,10 +1516,11 @@ func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ... return Subset(a.t, list, subset, msgAndArgs...) } -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). +// Subsetf asserts that the specified list(array, slice...) or map contains all +// elements given in the specified subset list(array, slice...) or map. // -// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") +// a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted") +// a.Subsetf({"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1423,7 +1530,7 @@ func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, a // True asserts that the specified value is true. // -// a.True(myBool) +// a.True(myBool) func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1433,7 +1540,7 @@ func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { // Truef asserts that the specified value is true. // -// a.Truef(myBool, "error message %s", "formatted") +// a.Truef(myBool, "error message %s", "formatted") func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1443,7 +1550,7 @@ func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { // WithinDuration asserts that the two times are within duration delta of each other. // -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) +// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1453,7 +1560,7 @@ func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta // WithinDurationf asserts that the two times are within duration delta of each other. // -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") +// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1463,7 +1570,7 @@ func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta // WithinRange asserts that a time is within a time range (inclusive). // -// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) +// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1473,7 +1580,7 @@ func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Tim // WithinRangef asserts that a time is within a time range (inclusive). // -// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") +// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() diff --git a/vendor/github.com/stretchr/testify/assert/assertion_order.go b/vendor/github.com/stretchr/testify/assert/assertion_order.go index 75944878..00df62a0 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_order.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_order.go @@ -46,36 +46,36 @@ func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareT // IsIncreasing asserts that the collection is increasing // -// assert.IsIncreasing(t, []int{1, 2, 3}) -// assert.IsIncreasing(t, []float{1, 2}) -// assert.IsIncreasing(t, []string{"a", "b"}) +// assert.IsIncreasing(t, []int{1, 2, 3}) +// assert.IsIncreasing(t, []float{1, 2}) +// assert.IsIncreasing(t, []string{"a", "b"}) func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // IsNonIncreasing asserts that the collection is not increasing // -// assert.IsNonIncreasing(t, []int{2, 1, 1}) -// assert.IsNonIncreasing(t, []float{2, 1}) -// assert.IsNonIncreasing(t, []string{"b", "a"}) +// assert.IsNonIncreasing(t, []int{2, 1, 1}) +// assert.IsNonIncreasing(t, []float{2, 1}) +// assert.IsNonIncreasing(t, []string{"b", "a"}) func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // IsDecreasing asserts that the collection is decreasing // -// assert.IsDecreasing(t, []int{2, 1, 0}) -// assert.IsDecreasing(t, []float{2, 1}) -// assert.IsDecreasing(t, []string{"b", "a"}) +// assert.IsDecreasing(t, []int{2, 1, 0}) +// assert.IsDecreasing(t, []float{2, 1}) +// assert.IsDecreasing(t, []string{"b", "a"}) func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // IsNonDecreasing asserts that the collection is not decreasing // -// assert.IsNonDecreasing(t, []int{1, 1, 2}) -// assert.IsNonDecreasing(t, []float{1, 2}) -// assert.IsNonDecreasing(t, []string{"a", "b"}) +// assert.IsNonDecreasing(t, []int{1, 1, 2}) +// assert.IsNonDecreasing(t, []float{1, 2}) +// assert.IsNonDecreasing(t, []string{"a", "b"}) func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go index fa1245b1..0b7570f2 100644 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ b/vendor/github.com/stretchr/testify/assert/assertions.go @@ -8,7 +8,6 @@ import ( "fmt" "math" "os" - "path/filepath" "reflect" "regexp" "runtime" @@ -20,7 +19,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/pmezard/go-difflib/difflib" - yaml "gopkg.in/yaml.v3" + "gopkg.in/yaml.v3" ) //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl" @@ -76,6 +75,84 @@ func ObjectsAreEqual(expected, actual interface{}) bool { return bytes.Equal(exp, act) } +// copyExportedFields iterates downward through nested data structures and creates a copy +// that only contains the exported struct fields. +func copyExportedFields(expected interface{}) interface{} { + if isNil(expected) { + return expected + } + + expectedType := reflect.TypeOf(expected) + expectedKind := expectedType.Kind() + expectedValue := reflect.ValueOf(expected) + + switch expectedKind { + case reflect.Struct: + result := reflect.New(expectedType).Elem() + for i := 0; i < expectedType.NumField(); i++ { + field := expectedType.Field(i) + isExported := field.IsExported() + if isExported { + fieldValue := expectedValue.Field(i) + if isNil(fieldValue) || isNil(fieldValue.Interface()) { + continue + } + newValue := copyExportedFields(fieldValue.Interface()) + result.Field(i).Set(reflect.ValueOf(newValue)) + } + } + return result.Interface() + + case reflect.Ptr: + result := reflect.New(expectedType.Elem()) + unexportedRemoved := copyExportedFields(expectedValue.Elem().Interface()) + result.Elem().Set(reflect.ValueOf(unexportedRemoved)) + return result.Interface() + + case reflect.Array, reflect.Slice: + var result reflect.Value + if expectedKind == reflect.Array { + result = reflect.New(reflect.ArrayOf(expectedValue.Len(), expectedType.Elem())).Elem() + } else { + result = reflect.MakeSlice(expectedType, expectedValue.Len(), expectedValue.Len()) + } + for i := 0; i < expectedValue.Len(); i++ { + index := expectedValue.Index(i) + if isNil(index) { + continue + } + unexportedRemoved := copyExportedFields(index.Interface()) + result.Index(i).Set(reflect.ValueOf(unexportedRemoved)) + } + return result.Interface() + + case reflect.Map: + result := reflect.MakeMap(expectedType) + for _, k := range expectedValue.MapKeys() { + index := expectedValue.MapIndex(k) + unexportedRemoved := copyExportedFields(index.Interface()) + result.SetMapIndex(k, reflect.ValueOf(unexportedRemoved)) + } + return result.Interface() + + default: + return expected + } +} + +// ObjectsExportedFieldsAreEqual determines if the exported (public) fields of two objects are +// considered equal. This comparison of only exported fields is applied recursively to nested data +// structures. +// +// This function does no assertion of any kind. +// +// Deprecated: Use [EqualExportedValues] instead. +func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool { + expectedCleaned := copyExportedFields(expected) + actualCleaned := copyExportedFields(actual) + return ObjectsAreEqualValues(expectedCleaned, actualCleaned) +} + // ObjectsAreEqualValues gets whether two objects are equal, or if their // values are equal. func ObjectsAreEqualValues(expected, actual interface{}) bool { @@ -83,17 +160,40 @@ func ObjectsAreEqualValues(expected, actual interface{}) bool { return true } - actualType := reflect.TypeOf(actual) - if actualType == nil { + expectedValue := reflect.ValueOf(expected) + actualValue := reflect.ValueOf(actual) + if !expectedValue.IsValid() || !actualValue.IsValid() { return false } - expectedValue := reflect.ValueOf(expected) - if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { + + expectedType := expectedValue.Type() + actualType := actualValue.Type() + if !expectedType.ConvertibleTo(actualType) { + return false + } + + if !isNumericType(expectedType) || !isNumericType(actualType) { // Attempt comparison after type conversion - return reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual) + return reflect.DeepEqual( + expectedValue.Convert(actualType).Interface(), actual, + ) } - return false + // If BOTH values are numeric, there are chances of false positives due + // to overflow or underflow. So, we need to make sure to always convert + // the smaller type to a larger type before comparing. + if expectedType.Size() >= actualType.Size() { + return actualValue.Convert(expectedType).Interface() == expected + } + + return expectedValue.Convert(actualType).Interface() == actual +} + +// isNumericType returns true if the type is one of: +// int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, +// float32, float64, complex64, complex128 +func isNumericType(t reflect.Type) bool { + return t.Kind() >= reflect.Int && t.Kind() <= reflect.Complex128 } /* CallerInfo is necessary because the assert functions use the testing object @@ -141,12 +241,11 @@ func CallerInfo() []string { } parts := strings.Split(file, "/") - file = parts[len(parts)-1] if len(parts) > 1 { + filename := parts[len(parts)-1] dir := parts[len(parts)-2] - if (dir != "assert" && dir != "mock" && dir != "require") || file == "mock_test.go" { - path, _ := filepath.Abs(file) - callers = append(callers, fmt.Sprintf("%s:%d", path, line)) + if (dir != "assert" && dir != "mock" && dir != "require") || filename == "mock_test.go" { + callers = append(callers, fmt.Sprintf("%s:%d", file, line)) } } @@ -197,7 +296,7 @@ func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { // Aligns the provided message so that all lines after the first line start at the same location as the first line. // Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab). -// The longestLabelLen parameter specifies the length of the longest label in the output (required becaues this is the +// The longestLabelLen parameter specifies the length of the longest label in the output (required because this is the // basis on which the alignment occurs). func indentMessageLines(message string, longestLabelLen int) string { outBuf := new(bytes.Buffer) @@ -273,7 +372,7 @@ type labeledContent struct { // labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner: // -// \t{{label}}:{{align_spaces}}\t{{content}}\n +// \t{{label}}:{{align_spaces}}\t{{content}}\n // // The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label. // If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this @@ -296,7 +395,7 @@ func labeledOutput(content ...labeledContent) string { // Implements asserts that an object is implemented by the specified interface. // -// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) +// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -313,6 +412,25 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg return true } +// NotImplements asserts that an object does not implement the specified interface. +// +// assert.NotImplements(t, (*MyInterface)(nil), new(MyObject)) +func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + interfaceType := reflect.TypeOf(interfaceObject).Elem() + + if object == nil { + return Fail(t, fmt.Sprintf("Cannot check if nil does not implement %v", interfaceType), msgAndArgs...) + } + if reflect.TypeOf(object).Implements(interfaceType) { + return Fail(t, fmt.Sprintf("%T implements %v", object, interfaceType), msgAndArgs...) + } + + return true +} + // IsType asserts that the specified objects are of the same type. func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { @@ -328,7 +446,7 @@ func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs // Equal asserts that two objects are equal. // -// assert.Equal(t, 123, 123) +// assert.Equal(t, 123, 123) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality @@ -369,7 +487,7 @@ func validateEqualArgs(expected, actual interface{}) error { // Same asserts that two pointers reference the same object. // -// assert.Same(t, ptr1, ptr2) +// assert.Same(t, ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -389,7 +507,7 @@ func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) b // NotSame asserts that two pointers do not reference the same object. // -// assert.NotSame(t, ptr1, ptr2) +// assert.NotSame(t, ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -427,7 +545,7 @@ func samePointers(first, second interface{}) bool { // representations appropriate to be presented to the user. // // If the values are not of like type, the returned strings will be prefixed -// with the type name, and the value will be enclosed in parenthesis similar +// with the type name, and the value will be enclosed in parentheses similar // to a type conversion in the Go grammar. func formatUnequalValues(expected, actual interface{}) (e string, a string) { if reflect.TypeOf(expected) != reflect.TypeOf(actual) { @@ -454,10 +572,10 @@ func truncatingFormat(data interface{}) string { return value } -// EqualValues asserts that two objects are equal or convertable to the same types +// EqualValues asserts that two objects are equal or convertible to the same types // and equal. // -// assert.EqualValues(t, uint32(123), int32(123)) +// assert.EqualValues(t, uint32(123), int32(123)) func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -475,9 +593,60 @@ func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interfa } +// EqualExportedValues asserts that the types of two objects are equal and their public +// fields are also equal. This is useful for comparing structs that have private fields +// that could potentially differ. +// +// type S struct { +// Exported int +// notExported int +// } +// assert.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true +// assert.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false +func EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + + aType := reflect.TypeOf(expected) + bType := reflect.TypeOf(actual) + + if aType != bType { + return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) + } + + if aType.Kind() == reflect.Ptr { + aType = aType.Elem() + } + if bType.Kind() == reflect.Ptr { + bType = bType.Elem() + } + + if aType.Kind() != reflect.Struct { + return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", aType.Kind(), reflect.Struct), msgAndArgs...) + } + + if bType.Kind() != reflect.Struct { + return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", bType.Kind(), reflect.Struct), msgAndArgs...) + } + + expected = copyExportedFields(expected) + actual = copyExportedFields(actual) + + if !ObjectsAreEqualValues(expected, actual) { + diff := diff(expected, actual) + expected, actual = formatUnequalValues(expected, actual) + return Fail(t, fmt.Sprintf("Not equal (comparing only exported fields): \n"+ + "expected: %s\n"+ + "actual : %s%s", expected, actual, diff), msgAndArgs...) + } + + return true +} + // Exactly asserts that two objects are equal in value and type. // -// assert.Exactly(t, int32(123), int64(123)) +// assert.Exactly(t, int32(123), int64(123)) func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -496,7 +665,7 @@ func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} // NotNil asserts that the specified object is not nil. // -// assert.NotNil(t, err) +// assert.NotNil(t, err) func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { if !isNil(object) { return true @@ -507,17 +676,6 @@ func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return Fail(t, "Expected value not to be nil.", msgAndArgs...) } -// containsKind checks if a specified kind in the slice of kinds. -func containsKind(kinds []reflect.Kind, kind reflect.Kind) bool { - for i := 0; i < len(kinds); i++ { - if kind == kinds[i] { - return true - } - } - - return false -} - // isNil checks if a specified object is nil or not, without Failing. func isNil(object interface{}) bool { if object == nil { @@ -525,16 +683,13 @@ func isNil(object interface{}) bool { } value := reflect.ValueOf(object) - kind := value.Kind() - isNilableKind := containsKind( - []reflect.Kind{ - reflect.Chan, reflect.Func, - reflect.Interface, reflect.Map, - reflect.Ptr, reflect.Slice}, - kind) - - if isNilableKind && value.IsNil() { - return true + switch value.Kind() { + case + reflect.Chan, reflect.Func, + reflect.Interface, reflect.Map, + reflect.Ptr, reflect.Slice, reflect.UnsafePointer: + + return value.IsNil() } return false @@ -542,7 +697,7 @@ func isNil(object interface{}) bool { // Nil asserts that the specified object is nil. // -// assert.Nil(t, err) +// assert.Nil(t, err) func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { if isNil(object) { return true @@ -585,7 +740,7 @@ func isEmpty(object interface{}) bool { // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// assert.Empty(t, obj) +// assert.Empty(t, obj) func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { pass := isEmpty(object) if !pass { @@ -602,9 +757,9 @@ func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } +// if assert.NotEmpty(t, obj) { +// assert.Equal(t, "two", obj[1]) +// } func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { pass := !isEmpty(object) if !pass { @@ -618,40 +773,38 @@ func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { } -// getLen try to get length of object. -// return (false, 0) if impossible. -func getLen(x interface{}) (ok bool, length int) { +// getLen tries to get the length of an object. +// It returns (0, false) if impossible. +func getLen(x interface{}) (length int, ok bool) { v := reflect.ValueOf(x) defer func() { - if e := recover(); e != nil { - ok = false - } + ok = recover() == nil }() - return true, v.Len() + return v.Len(), true } // Len asserts that the specified object has specific length. // Len also fails if the object has a type that len() not accept. // -// assert.Len(t, mySlice, 3) +// assert.Len(t, mySlice, 3) func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } - ok, l := getLen(object) + l, ok := getLen(object) if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", object), msgAndArgs...) + return Fail(t, fmt.Sprintf("\"%v\" could not be applied builtin len()", object), msgAndArgs...) } if l != length { - return Fail(t, fmt.Sprintf("\"%s\" should have %d item(s), but has %d", object, length, l), msgAndArgs...) + return Fail(t, fmt.Sprintf("\"%v\" should have %d item(s), but has %d", object, length, l), msgAndArgs...) } return true } // True asserts that the specified value is true. // -// assert.True(t, myBool) +// assert.True(t, myBool) func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { if !value { if h, ok := t.(tHelper); ok { @@ -666,7 +819,7 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { // False asserts that the specified value is false. // -// assert.False(t, myBool) +// assert.False(t, myBool) func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { if value { if h, ok := t.(tHelper); ok { @@ -681,7 +834,7 @@ func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { // NotEqual asserts that the specified values are NOT equal. // -// assert.NotEqual(t, obj1, obj2) +// assert.NotEqual(t, obj1, obj2) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). @@ -704,7 +857,7 @@ func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{ // NotEqualValues asserts that two objects are not equal even when converted to the same type // -// assert.NotEqualValues(t, obj1, obj2) +// assert.NotEqualValues(t, obj1, obj2) func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -763,9 +916,9 @@ func containsElement(list interface{}, element interface{}) (ok, found bool) { // Contains asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // -// assert.Contains(t, "Hello World", "World") -// assert.Contains(t, ["Hello", "World"], "World") -// assert.Contains(t, {"Hello": "World"}, "Hello") +// assert.Contains(t, "Hello World", "World") +// assert.Contains(t, ["Hello", "World"], "World") +// assert.Contains(t, {"Hello": "World"}, "Hello") func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -786,9 +939,9 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // -// assert.NotContains(t, "Hello World", "Earth") -// assert.NotContains(t, ["Hello", "World"], "Earth") -// assert.NotContains(t, {"Hello": "World"}, "Earth") +// assert.NotContains(t, "Hello World", "Earth") +// assert.NotContains(t, ["Hello", "World"], "Earth") +// assert.NotContains(t, {"Hello": "World"}, "Earth") func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -796,20 +949,21 @@ func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) ok, found := containsElement(s, contains) if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...) + return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) } if found { - return Fail(t, fmt.Sprintf("\"%s\" should not contain \"%s\"", s, contains), msgAndArgs...) + return Fail(t, fmt.Sprintf("%#v should not contain %#v", s, contains), msgAndArgs...) } return true } -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). +// Subset asserts that the specified list(array, slice...) or map contains all +// elements given in the specified subset list(array, slice...) or map. // -// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") +// assert.Subset(t, [1, 2, 3], [1, 2]) +// assert.Subset(t, {"x": 1, "y": 2}, {"x": 1}) func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { if h, ok := t.(tHelper); ok { h.Helper() @@ -818,59 +972,56 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok return true // we consider nil to be equal to the nil set } - defer func() { - if e := recover(); e != nil { - ok = false - } - }() - listKind := reflect.TypeOf(list).Kind() - subsetKind := reflect.TypeOf(subset).Kind() - if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) } + subsetKind := reflect.TypeOf(subset).Kind() if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) } - subsetValue := reflect.ValueOf(subset) if subsetKind == reflect.Map && listKind == reflect.Map { - listValue := reflect.ValueOf(list) - subsetKeys := subsetValue.MapKeys() + subsetMap := reflect.ValueOf(subset) + actualMap := reflect.ValueOf(list) - for i := 0; i < len(subsetKeys); i++ { - subsetKey := subsetKeys[i] - subsetElement := subsetValue.MapIndex(subsetKey).Interface() - listElement := listValue.MapIndex(subsetKey).Interface() + for _, k := range subsetMap.MapKeys() { + ev := subsetMap.MapIndex(k) + av := actualMap.MapIndex(k) - if !ObjectsAreEqual(subsetElement, listElement) { - return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, subsetElement), msgAndArgs...) + if !av.IsValid() { + return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) + } + if !ObjectsAreEqual(ev.Interface(), av.Interface()) { + return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) } } return true } - for i := 0; i < subsetValue.Len(); i++ { - element := subsetValue.Index(i).Interface() + subsetList := reflect.ValueOf(subset) + for i := 0; i < subsetList.Len(); i++ { + element := subsetList.Index(i).Interface() ok, found := containsElement(list, element) if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) + return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", list), msgAndArgs...) } if !found { - return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, element), msgAndArgs...) + return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, element), msgAndArgs...) } } return true } -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). +// NotSubset asserts that the specified list(array, slice...) or map does NOT +// contain all elements given in the specified subset list(array, slice...) or +// map. // -// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") +// assert.NotSubset(t, [1, 3, 4], [1, 2]) +// assert.NotSubset(t, {"x": 1, "y": 2}, {"z": 3}) func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { if h, ok := t.(tHelper); ok { h.Helper() @@ -879,34 +1030,28 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...) } - defer func() { - if e := recover(); e != nil { - ok = false - } - }() - listKind := reflect.TypeOf(list).Kind() - subsetKind := reflect.TypeOf(subset).Kind() - if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) } + subsetKind := reflect.TypeOf(subset).Kind() if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) } - subsetValue := reflect.ValueOf(subset) if subsetKind == reflect.Map && listKind == reflect.Map { - listValue := reflect.ValueOf(list) - subsetKeys := subsetValue.MapKeys() + subsetMap := reflect.ValueOf(subset) + actualMap := reflect.ValueOf(list) - for i := 0; i < len(subsetKeys); i++ { - subsetKey := subsetKeys[i] - subsetElement := subsetValue.MapIndex(subsetKey).Interface() - listElement := listValue.MapIndex(subsetKey).Interface() + for _, k := range subsetMap.MapKeys() { + ev := subsetMap.MapIndex(k) + av := actualMap.MapIndex(k) - if !ObjectsAreEqual(subsetElement, listElement) { + if !av.IsValid() { + return true + } + if !ObjectsAreEqual(ev.Interface(), av.Interface()) { return true } } @@ -914,8 +1059,9 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) } - for i := 0; i < subsetValue.Len(); i++ { - element := subsetValue.Index(i).Interface() + subsetList := reflect.ValueOf(subset) + for i := 0; i < subsetList.Len(); i++ { + element := subsetList.Index(i).Interface() ok, found := containsElement(list, element) if !ok { return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) @@ -1060,7 +1206,7 @@ func didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string // Panics asserts that the code inside the specified PanicTestFunc panics. // -// assert.Panics(t, func(){ GoCrazy() }) +// assert.Panics(t, func(){ GoCrazy() }) func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1076,7 +1222,7 @@ func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // -// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) +// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1097,7 +1243,7 @@ func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndAr // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // -// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) +// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1117,7 +1263,7 @@ func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs . // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. // -// assert.NotPanics(t, func(){ RemainCalm() }) +// assert.NotPanics(t, func(){ RemainCalm() }) func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1132,7 +1278,7 @@ func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { // WithinDuration asserts that the two times are within duration delta of each other. // -// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) +// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1148,7 +1294,7 @@ func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, // WithinRange asserts that a time is within a time range (inclusive). // -// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) +// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) func WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1207,7 +1353,7 @@ func toFloat(x interface{}) (float64, bool) { // InDelta asserts that the two numerals are within delta of each other. // -// assert.InDelta(t, math.Pi, 22/7.0, 0.01) +// assert.InDelta(t, math.Pi, 22/7.0, 0.01) func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1336,7 +1482,7 @@ func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAnd h.Helper() } if math.IsNaN(epsilon) { - return Fail(t, "epsilon must not be NaN") + return Fail(t, "epsilon must not be NaN", msgAndArgs...) } actualEpsilon, err := calcRelativeError(expected, actual) if err != nil { @@ -1355,19 +1501,26 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m if h, ok := t.(tHelper); ok { h.Helper() } - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Slice || - reflect.TypeOf(expected).Kind() != reflect.Slice { + + if expected == nil || actual == nil { return Fail(t, "Parameters must be slice", msgAndArgs...) } - actualSlice := reflect.ValueOf(actual) expectedSlice := reflect.ValueOf(expected) + actualSlice := reflect.ValueOf(actual) - for i := 0; i < actualSlice.Len(); i++ { - result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon) - if !result { - return result + if expectedSlice.Type().Kind() != reflect.Slice { + return Fail(t, "Expected value must be slice", msgAndArgs...) + } + + expectedLen := expectedSlice.Len() + if !IsType(t, expected, actual) || !Len(t, actual, expectedLen) { + return false + } + + for i := 0; i < expectedLen; i++ { + if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) { + return false } } @@ -1380,10 +1533,10 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m // NoError asserts that a function returned no error (i.e. `nil`). // -// actualObj, err := SomeFunction() -// if assert.NoError(t, err) { -// assert.Equal(t, expectedObj, actualObj) -// } +// actualObj, err := SomeFunction() +// if assert.NoError(t, err) { +// assert.Equal(t, expectedObj, actualObj) +// } func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { if err != nil { if h, ok := t.(tHelper); ok { @@ -1397,10 +1550,10 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { // Error asserts that a function returned an error (i.e. not `nil`). // -// actualObj, err := SomeFunction() -// if assert.Error(t, err) { -// assert.Equal(t, expectedError, err) -// } +// actualObj, err := SomeFunction() +// if assert.Error(t, err) { +// assert.Equal(t, expectedError, err) +// } func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { if err == nil { if h, ok := t.(tHelper); ok { @@ -1415,8 +1568,8 @@ func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { // EqualError asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // -// actualObj, err := SomeFunction() -// assert.EqualError(t, err, expectedErrorString) +// actualObj, err := SomeFunction() +// assert.EqualError(t, err, expectedErrorString) func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1438,8 +1591,8 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte // ErrorContains asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // -// actualObj, err := SomeFunction() -// assert.ErrorContains(t, err, expectedErrorSubString) +// actualObj, err := SomeFunction() +// assert.ErrorContains(t, err, expectedErrorSubString) func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1472,8 +1625,8 @@ func matchRegexp(rx interface{}, str interface{}) bool { // Regexp asserts that a specified regexp matches a string. // -// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") -// assert.Regexp(t, "start...$", "it's not starting") +// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") +// assert.Regexp(t, "start...$", "it's not starting") func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1490,8 +1643,8 @@ func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface // NotRegexp asserts that a specified regexp does not match a string. // -// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// assert.NotRegexp(t, "^start", "it's not starting") +// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") +// assert.NotRegexp(t, "^start", "it's not starting") func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1603,7 +1756,7 @@ func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { // JSONEq asserts that two JSON strings are equivalent. // -// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1726,7 +1879,7 @@ type tHelper interface { // Eventually asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // -// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) +// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1756,10 +1909,94 @@ func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick t } } +// CollectT implements the TestingT interface and collects all errors. +type CollectT struct { + errors []error +} + +// Errorf collects the error. +func (c *CollectT) Errorf(format string, args ...interface{}) { + c.errors = append(c.errors, fmt.Errorf(format, args...)) +} + +// FailNow panics. +func (*CollectT) FailNow() { + panic("Assertion failed") +} + +// Deprecated: That was a method for internal usage that should not have been published. Now just panics. +func (*CollectT) Reset() { + panic("Reset() is deprecated") +} + +// Deprecated: That was a method for internal usage that should not have been published. Now just panics. +func (*CollectT) Copy(TestingT) { + panic("Copy() is deprecated") +} + +// EventuallyWithT asserts that given condition will be met in waitFor time, +// periodically checking target function each tick. In contrast to Eventually, +// it supplies a CollectT to the condition function, so that the condition +// function can use the CollectT to call other assertions. +// The condition is considered "met" if no errors are raised in a tick. +// The supplied CollectT collects all errors from one tick (if there are any). +// If the condition is not met before waitFor, the collected errors of +// the last tick are copied to t. +// +// externalValue := false +// go func() { +// time.Sleep(8*time.Second) +// externalValue = true +// }() +// assert.EventuallyWithT(t, func(c *assert.CollectT) { +// // add assertions as needed; any assertion failure will fail the current tick +// assert.True(c, externalValue, "expected 'externalValue' to be true") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") +func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + + var lastFinishedTickErrs []error + ch := make(chan []error, 1) + + timer := time.NewTimer(waitFor) + defer timer.Stop() + + ticker := time.NewTicker(tick) + defer ticker.Stop() + + for tick := ticker.C; ; { + select { + case <-timer.C: + for _, err := range lastFinishedTickErrs { + t.Errorf("%v", err) + } + return Fail(t, "Condition never satisfied", msgAndArgs...) + case <-tick: + tick = nil + go func() { + collect := new(CollectT) + defer func() { + ch <- collect.errors + }() + condition(collect) + }() + case errs := <-ch: + if len(errs) == 0 { + return true + } + // Keep the errors from the last ended condition, so that they can be copied to t if timeout is reached. + lastFinishedTickErrs = errs + tick = ticker.C + } + } +} + // Never asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // -// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) +// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() diff --git a/vendor/github.com/stretchr/testify/assert/doc.go b/vendor/github.com/stretchr/testify/assert/doc.go index c9dccc4d..4953981d 100644 --- a/vendor/github.com/stretchr/testify/assert/doc.go +++ b/vendor/github.com/stretchr/testify/assert/doc.go @@ -1,39 +1,40 @@ // Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. // -// Example Usage +// # Example Usage // // The following is a complete example using assert in a standard test function: -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) // -// func TestSomething(t *testing.T) { +// import ( +// "testing" +// "github.com/stretchr/testify/assert" +// ) // -// var a string = "Hello" -// var b string = "Hello" +// func TestSomething(t *testing.T) { // -// assert.Equal(t, a, b, "The two words should be the same.") +// var a string = "Hello" +// var b string = "Hello" // -// } +// assert.Equal(t, a, b, "The two words should be the same.") +// +// } // // if you assert many times, use the format below: // -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) +// import ( +// "testing" +// "github.com/stretchr/testify/assert" +// ) // -// func TestSomething(t *testing.T) { -// assert := assert.New(t) +// func TestSomething(t *testing.T) { +// assert := assert.New(t) // -// var a string = "Hello" -// var b string = "Hello" +// var a string = "Hello" +// var b string = "Hello" // -// assert.Equal(a, b, "The two words should be the same.") -// } +// assert.Equal(a, b, "The two words should be the same.") +// } // -// Assertions +// # Assertions // // Assertions allow you to easily write test code, and are global funcs in the `assert` package. // All assertion functions take, as the first argument, the `*testing.T` object provided by the diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go index 4ed341dd..861ed4b7 100644 --- a/vendor/github.com/stretchr/testify/assert/http_assertions.go +++ b/vendor/github.com/stretchr/testify/assert/http_assertions.go @@ -12,7 +12,7 @@ import ( // an error if building a new request fails. func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) { w := httptest.NewRecorder() - req, err := http.NewRequest(method, url, nil) + req, err := http.NewRequest(method, url, http.NoBody) if err != nil { return -1, err } @@ -23,7 +23,7 @@ func httpCode(handler http.HandlerFunc, method, url string, values url.Values) ( // HTTPSuccess asserts that a specified handler returns a success status code. // -// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) +// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { @@ -32,12 +32,12 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, value } code, err := httpCode(handler, method, url, values) if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) + Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent if !isSuccessCode { - Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code)) + Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) } return isSuccessCode @@ -45,7 +45,7 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, value // HTTPRedirect asserts that a specified handler returns a redirect status code. // -// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { @@ -54,12 +54,12 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, valu } code, err := httpCode(handler, method, url, values) if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) + Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect if !isRedirectCode { - Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code)) + Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) } return isRedirectCode @@ -67,7 +67,7 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, valu // HTTPError asserts that a specified handler returns an error status code. // -// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { @@ -76,12 +76,12 @@ func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values } code, err := httpCode(handler, method, url, values) if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) + Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } isErrorCode := code >= http.StatusBadRequest if !isErrorCode { - Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code)) + Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) } return isErrorCode @@ -89,7 +89,7 @@ func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values // HTTPStatusCode asserts that a specified handler returns a specified status code. // -// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) +// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) // // Returns whether the assertion was successful (true) or not (false). func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { @@ -98,12 +98,12 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, va } code, err := httpCode(handler, method, url, values) if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) + Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } successful := code == statuscode if !successful { - Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code)) + Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code), msgAndArgs...) } return successful @@ -113,7 +113,10 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, va // empty string if building a new request fails. func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { w := httptest.NewRecorder() - req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) + if len(values) > 0 { + url += "?" + values.Encode() + } + req, err := http.NewRequest(method, url, http.NoBody) if err != nil { return "" } @@ -124,7 +127,7 @@ func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) s // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // -// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") +// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { @@ -135,7 +138,7 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, contains := strings.Contains(body, fmt.Sprint(str)) if !contains { - Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) + Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body), msgAndArgs...) } return contains @@ -144,7 +147,7 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // -// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") +// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { @@ -155,7 +158,7 @@ func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url strin contains := strings.Contains(body, fmt.Sprint(str)) if contains { - Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) + Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body), msgAndArgs...) } return !contains diff --git a/vendor/github.com/tidwall/gjson/README.md b/vendor/github.com/tidwall/gjson/README.md index c8db11f1..96b2e4dc 100644 --- a/vendor/github.com/tidwall/gjson/README.md +++ b/vendor/github.com/tidwall/gjson/README.md @@ -211,6 +211,7 @@ There are currently the following built-in modifiers: - `@tostr`: Converts json to a string. Wraps a json string. - `@fromstr`: Converts a string from json. Unwraps a json string. - `@group`: Groups arrays of objects. See [e4fc67c](https://github.com/tidwall/gjson/commit/e4fc67c92aeebf2089fabc7872f010e340d105db). +- `@dig`: Search for a value without providing its entire path. See [e8e87f2](https://github.com/tidwall/gjson/commit/e8e87f2a00dc41f3aba5631094e21f59a8cf8cbf). ### Modifier arguments @@ -426,16 +427,6 @@ if result.Index > 0 { This is a best-effort no allocation sub slice of the original json. This method utilizes the `result.Index` field, which is the position of the raw data in the original json. It's possible that the value of `result.Index` equals zero, in which case the `result.Raw` is converted to a `[]byte`. -## Get multiple values at once - -The `GetMany` function can be used to get multiple values at the same time. - -```go -results := gjson.GetMany(json, "name.first", "name.last", "age") -``` - -The return value is a `[]Result`, which will always contain exactly the same number of items as the input paths. - ## Performance Benchmarks of GJSON alongside [encoding/json](https://golang.org/pkg/encoding/json/), diff --git a/vendor/github.com/tidwall/gjson/SYNTAX.md b/vendor/github.com/tidwall/gjson/SYNTAX.md index 7a9b6a2d..6721d7f5 100644 --- a/vendor/github.com/tidwall/gjson/SYNTAX.md +++ b/vendor/github.com/tidwall/gjson/SYNTAX.md @@ -137,12 +137,21 @@ next major release.* The `~` (tilde) operator will convert a value to a boolean before comparison. +Supported tilde comparison type are: + +``` +~true Converts true-ish values to true +~false Converts false-ish and non-existent values to true +~null Converts null and non-existent values to true +~* Converts any existing value to true +``` + For example, using the following JSON: ```json { "vals": [ - { "a": 1, "b": true }, + { "a": 1, "b": "data" }, { "a": 2, "b": true }, { "a": 3, "b": false }, { "a": 4, "b": "0" }, @@ -157,15 +166,23 @@ For example, using the following JSON: } ``` -You can now query for all true(ish) or false(ish) values: +To query for all true-ish or false-ish values: ``` -vals.#(b==~true)#.a >> [1,2,6,7,8] +vals.#(b==~true)#.a >> [2,6,7,8] vals.#(b==~false)#.a >> [3,4,5,9,10,11] ``` The last value which was non-existent is treated as `false` +To query for null and explicit value existence: + +``` +vals.#(b==~null)#.a >> [10,11] +vals.#(b==~*)#.a >> [1,2,3,4,5,6,7,8,9,10] +vals.#(b!=~*)#.a >> [11] +``` + ### Dot vs Pipe The `.` is standard separator, but it's also possible to use a `|`. @@ -241,6 +258,7 @@ There are currently the following built-in modifiers: - `@tostr`: Converts json to a string. Wraps a json string. - `@fromstr`: Converts a string from json. Unwraps a json string. - `@group`: Groups arrays of objects. See [e4fc67c](https://github.com/tidwall/gjson/commit/e4fc67c92aeebf2089fabc7872f010e340d105db). +- `@dig`: Search for a value without providing its entire path. See [e8e87f2](https://github.com/tidwall/gjson/commit/e8e87f2a00dc41f3aba5631094e21f59a8cf8cbf). #### Modifier arguments diff --git a/vendor/github.com/tidwall/gjson/gjson.go b/vendor/github.com/tidwall/gjson/gjson.go index 53cbd236..4acd087c 100644 --- a/vendor/github.com/tidwall/gjson/gjson.go +++ b/vendor/github.com/tidwall/gjson/gjson.go @@ -645,9 +645,9 @@ func tostr(json string) (raw string, str string) { // Exists returns true if value exists. // -// if gjson.Get(json, "name.last").Exists(){ -// println("value exists") -// } +// if gjson.Get(json, "name.last").Exists(){ +// println("value exists") +// } func (t Result) Exists() bool { return t.Type != Null || len(t.Raw) != 0 } @@ -661,7 +661,6 @@ func (t Result) Exists() bool { // nil, for JSON null // map[string]interface{}, for JSON objects // []interface{}, for JSON arrays -// func (t Result) Value() interface{} { if t.Type == String { return t.Str @@ -826,19 +825,28 @@ func parseArrayPath(path string) (r arrayPathResult) { } // splitQuery takes a query and splits it into three parts: -// path, op, middle, and right. +// +// path, op, middle, and right. +// // So for this query: -// #(first_name=="Murphy").last +// +// #(first_name=="Murphy").last +// // Becomes -// first_name # path -// =="Murphy" # middle -// .last # right +// +// first_name # path +// =="Murphy" # middle +// .last # right +// // Or, -// #(service_roles.#(=="one")).cap +// +// #(service_roles.#(=="one")).cap +// // Becomes -// service_roles.#(=="one") # path -// # middle -// .cap # right +// +// service_roles.#(=="one") # path +// # middle +// .cap # right func parseQuery(query string) ( path, op, value, remain string, i int, vesc, ok bool, ) { @@ -1251,15 +1259,74 @@ func matchLimit(str, pattern string) bool { return matched } +func falseish(t Result) bool { + switch t.Type { + case Null: + return true + case False: + return true + case String: + b, err := strconv.ParseBool(strings.ToLower(t.Str)) + if err != nil { + return false + } + return !b + case Number: + return t.Num == 0 + default: + return false + } +} + +func trueish(t Result) bool { + switch t.Type { + case True: + return true + case String: + b, err := strconv.ParseBool(strings.ToLower(t.Str)) + if err != nil { + return false + } + return b + case Number: + return t.Num != 0 + default: + return false + } +} + +func nullish(t Result) bool { + return t.Type == Null +} + func queryMatches(rp *arrayPathResult, value Result) bool { rpv := rp.query.value - if len(rpv) > 0 && rpv[0] == '~' { - // convert to bool - rpv = rpv[1:] - if value.Bool() { - value = Result{Type: True} - } else { - value = Result{Type: False} + if len(rpv) > 0 { + if rpv[0] == '~' { + // convert to bool + rpv = rpv[1:] + var ish, ok bool + switch rpv { + case "*": + ish, ok = value.Exists(), true + case "null": + ish, ok = nullish(value), true + case "true": + ish, ok = trueish(value), true + case "false": + ish, ok = falseish(value), true + } + if ok { + rpv = "true" + if ish { + value = Result{Type: True} + } else { + value = Result{Type: False} + } + } else { + rpv = "" + value = Result{} + } } } if !value.Exists() { @@ -1859,6 +1926,10 @@ func AppendJSONString(dst []byte, s string) []byte { if s[i] < ' ' { dst = append(dst, '\\') switch s[i] { + case '\b': + dst = append(dst, 'b') + case '\f': + dst = append(dst, 'f') case '\n': dst = append(dst, 'n') case '\r': @@ -1918,23 +1989,23 @@ type parseContext struct { // the '#' character. // The dot and wildcard character can be escaped with '\'. // -// { -// "name": {"first": "Tom", "last": "Anderson"}, -// "age":37, -// "children": ["Sara","Alex","Jack"], -// "friends": [ -// {"first": "James", "last": "Murphy"}, -// {"first": "Roger", "last": "Craig"} -// ] -// } -// "name.last" >> "Anderson" -// "age" >> 37 -// "children" >> ["Sara","Alex","Jack"] -// "children.#" >> 3 -// "children.1" >> "Alex" -// "child*.2" >> "Jack" -// "c?ildren.0" >> "Sara" -// "friends.#.first" >> ["James","Roger"] +// { +// "name": {"first": "Tom", "last": "Anderson"}, +// "age":37, +// "children": ["Sara","Alex","Jack"], +// "friends": [ +// {"first": "James", "last": "Murphy"}, +// {"first": "Roger", "last": "Craig"} +// ] +// } +// "name.last" >> "Anderson" +// "age" >> 37 +// "children" >> ["Sara","Alex","Jack"] +// "children.#" >> 3 +// "children.1" >> "Alex" +// "child*.2" >> "Jack" +// "c?ildren.0" >> "Sara" +// "friends.#.first" >> ["James","Roger"] // // This function expects that the json is well-formed, and does not validate. // Invalid json will not panic, but it may return back unexpected results. @@ -2126,8 +2197,7 @@ func unescape(json string) string { // The caseSensitive paramater is used when the tokens are Strings. // The order when comparing two different type is: // -// Null < False < Number < String < True < JSON -// +// Null < False < Number < String < True < JSON func (t Result) Less(token Result, caseSensitive bool) bool { if t.Type < token.Type { return true @@ -2556,11 +2626,10 @@ func validnull(data []byte, i int) (outi int, ok bool) { // Valid returns true if the input is valid json. // -// if !gjson.Valid(json) { -// return errors.New("invalid json") -// } -// value := gjson.Get(json, "name.last") -// +// if !gjson.Valid(json) { +// return errors.New("invalid json") +// } +// value := gjson.Get(json, "name.last") func Valid(json string) bool { _, ok := validpayload(stringBytes(json), 0) return ok @@ -2568,13 +2637,12 @@ func Valid(json string) bool { // ValidBytes returns true if the input is valid json. // -// if !gjson.Valid(json) { -// return errors.New("invalid json") -// } -// value := gjson.Get(json, "name.last") +// if !gjson.Valid(json) { +// return errors.New("invalid json") +// } +// value := gjson.Get(json, "name.last") // // If working with bytes, this method preferred over ValidBytes(string(data)) -// func ValidBytes(json []byte) bool { _, ok := validpayload(json, 0) return ok @@ -2690,6 +2758,7 @@ func execModifier(json, path string) (pathOut, res string, ok bool) { var parsedArgs bool switch pathOut[0] { case '{', '[', '"': + // json arg res := Parse(pathOut) if res.Exists() { args = squash(pathOut) @@ -2698,14 +2767,20 @@ func execModifier(json, path string) (pathOut, res string, ok bool) { } } if !parsedArgs { - idx := strings.IndexByte(pathOut, '|') - if idx == -1 { - args = pathOut - pathOut = "" - } else { - args = pathOut[:idx] - pathOut = pathOut[idx:] + // simple arg + i := 0 + for ; i < len(pathOut); i++ { + if pathOut[i] == '|' { + break + } + switch pathOut[i] { + case '{', '[', '"', '(': + s := squash(pathOut[i:]) + i += len(s) - 1 + } } + args = pathOut[:i] + pathOut = pathOut[i:] } } return pathOut, fn(json, args), true @@ -2725,19 +2800,24 @@ func unwrap(json string) string { // DisableModifiers will disable the modifier syntax var DisableModifiers = false -var modifiers = map[string]func(json, arg string) string{ - "pretty": modPretty, - "ugly": modUgly, - "reverse": modReverse, - "this": modThis, - "flatten": modFlatten, - "join": modJoin, - "valid": modValid, - "keys": modKeys, - "values": modValues, - "tostr": modToStr, - "fromstr": modFromStr, - "group": modGroup, +var modifiers map[string]func(json, arg string) string + +func init() { + modifiers = map[string]func(json, arg string) string{ + "pretty": modPretty, + "ugly": modUgly, + "reverse": modReverse, + "this": modThis, + "flatten": modFlatten, + "join": modJoin, + "valid": modValid, + "keys": modKeys, + "values": modValues, + "tostr": modToStr, + "fromstr": modFromStr, + "group": modGroup, + "dig": modDig, + } } // AddModifier binds a custom modifier command to the GJSON syntax. @@ -2848,9 +2928,13 @@ func modReverse(json, arg string) string { } // @flatten an array with child arrays. -// [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,[6,7]] +// +// [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,[6,7]] +// // The {"deep":true} arg can be provide for deep flattening. -// [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,6,7] +// +// [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,6,7] +// // The original json is returned when the json is not an array. func modFlatten(json, arg string) string { res := Parse(json) @@ -2895,7 +2979,8 @@ func modFlatten(json, arg string) string { } // @keys extracts the keys from an object. -// {"first":"Tom","last":"Smith"} -> ["first","last"] +// +// {"first":"Tom","last":"Smith"} -> ["first","last"] func modKeys(json, arg string) string { v := Parse(json) if !v.Exists() { @@ -2922,7 +3007,8 @@ func modKeys(json, arg string) string { } // @values extracts the values from an object. -// {"first":"Tom","last":"Smith"} -> ["Tom","Smith"] +// +// {"first":"Tom","last":"Smith"} -> ["Tom","Smith"] func modValues(json, arg string) string { v := Parse(json) if !v.Exists() { @@ -2947,11 +3033,17 @@ func modValues(json, arg string) string { } // @join multiple objects into a single object. -// [{"first":"Tom"},{"last":"Smith"}] -> {"first","Tom","last":"Smith"} +// +// [{"first":"Tom"},{"last":"Smith"}] -> {"first","Tom","last":"Smith"} +// // The arg can be "true" to specify that duplicate keys should be preserved. -// [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":37,"age":41} +// +// [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":37,"age":41} +// // Without preserved keys: -// [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":41} +// +// [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":41} +// // The original json is returned when the json is not an object. func modJoin(json, arg string) string { res := Parse(json) @@ -3024,7 +3116,8 @@ func modValid(json, arg string) string { } // @fromstr converts a string to json -// "{\"id\":1023,\"name\":\"alert\"}" -> {"id":1023,"name":"alert"} +// +// "{\"id\":1023,\"name\":\"alert\"}" -> {"id":1023,"name":"alert"} func modFromStr(json, arg string) string { if !Valid(json) { return "" @@ -3033,7 +3126,8 @@ func modFromStr(json, arg string) string { } // @tostr converts a string to json -// {"id":1023,"name":"alert"} -> "{\"id\":1023,\"name\":\"alert\"}" +// +// {"id":1023,"name":"alert"} -> "{\"id\":1023,\"name\":\"alert\"}" func modToStr(str, arg string) string { return string(AppendJSONString(nil, str)) } @@ -3210,11 +3304,11 @@ func revSquash(json string) string { // Paths returns the original GJSON paths for a Result where the Result came // from a simple query path that returns an array, like: // -// gjson.Get(json, "friends.#.first") +// gjson.Get(json, "friends.#.first") // // The returned value will be in the form of a JSON array: // -// ["friends.0.first","friends.1.first","friends.2.first"] +// ["friends.0.first","friends.1.first","friends.2.first"] // // The param 'json' must be the original JSON used when calling Get. // @@ -3239,11 +3333,11 @@ func (t Result) Paths(json string) []string { // Path returns the original GJSON path for a Result where the Result came // from a simple path that returns a single value, like: // -// gjson.Get(json, "friends.#(last=Murphy)") +// gjson.Get(json, "friends.#(last=Murphy)") // // The returned value will be in the form of a JSON string: // -// "friends.0" +// "friends.0" // // The param 'json' must be the original JSON used when calling Get. // @@ -3320,7 +3414,7 @@ func (t Result) Path(json string) string { if !rcomp.Exists() { goto fail } - comp := escapeComp(rcomp.String()) + comp := Escape(rcomp.String()) path = append(path, '.') path = append(path, comp...) } @@ -3335,17 +3429,31 @@ fail: // isSafePathKeyChar returns true if the input character is safe for not // needing escaping. func isSafePathKeyChar(c byte) bool { - return c <= ' ' || c > '~' || c == '_' || c == '-' || c == ':' || - (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || c <= ' ' || c > '~' || c == '_' || + c == '-' || c == ':' } -// escapeComp escaped a path compontent, making it safe for generating a -// path for later use. -func escapeComp(comp string) string { +// Escape returns an escaped path component. +// +// json := `{ +// "user":{ +// "first.name": "Janet", +// "last.name": "Prichard" +// } +// }` +// user := gjson.Get(json, "user") +// println(user.Get(gjson.Escape("first.name")) +// println(user.Get(gjson.Escape("last.name")) +// // Output: +// // Janet +// // Prichard +func Escape(comp string) string { for i := 0; i < len(comp); i++ { if !isSafePathKeyChar(comp[i]) { - ncomp := []byte(comp[:i]) + ncomp := make([]byte, len(comp)+1) + copy(ncomp, comp[:i]) + ncomp = ncomp[:i] for ; i < len(comp); i++ { if !isSafePathKeyChar(comp[i]) { ncomp = append(ncomp, '\\') @@ -3357,3 +3465,30 @@ func escapeComp(comp string) string { } return comp } + +func parseRecursiveDescent(all []Result, parent Result, path string) []Result { + if res := parent.Get(path); res.Exists() { + all = append(all, res) + } + if parent.IsArray() || parent.IsObject() { + parent.ForEach(func(_, val Result) bool { + all = parseRecursiveDescent(all, val, path) + return true + }) + } + return all +} + +func modDig(json, arg string) string { + all := parseRecursiveDescent(nil, Parse(json), arg) + var out []byte + out = append(out, '[') + for i, res := range all { + if i > 0 { + out = append(out, ',') + } + out = append(out, res.Raw...) + } + out = append(out, ']') + return string(out) +} diff --git a/vendor/github.com/tidwall/pretty/README.md b/vendor/github.com/tidwall/pretty/README.md index d3be5e54..76c06a5e 100644 --- a/vendor/github.com/tidwall/pretty/README.md +++ b/vendor/github.com/tidwall/pretty/README.md @@ -59,7 +59,7 @@ Will format the json to: Color will colorize the json for outputing to the screen. -```json +```go result = pretty.Color(json, nil) ``` diff --git a/vendor/github.com/tidwall/pretty/pretty.go b/vendor/github.com/tidwall/pretty/pretty.go index f3f756aa..d705f9cd 100644 --- a/vendor/github.com/tidwall/pretty/pretty.go +++ b/vendor/github.com/tidwall/pretty/pretty.go @@ -422,6 +422,7 @@ type Style struct { Key, String, Number [2]string True, False, Null [2]string Escape [2]string + Brackets [2]string Append func(dst []byte, c byte) []byte } @@ -439,13 +440,14 @@ var TerminalStyle *Style func init() { TerminalStyle = &Style{ - Key: [2]string{"\x1B[94m", "\x1B[0m"}, - String: [2]string{"\x1B[92m", "\x1B[0m"}, - Number: [2]string{"\x1B[93m", "\x1B[0m"}, - True: [2]string{"\x1B[96m", "\x1B[0m"}, - False: [2]string{"\x1B[96m", "\x1B[0m"}, - Null: [2]string{"\x1B[91m", "\x1B[0m"}, - Escape: [2]string{"\x1B[35m", "\x1B[0m"}, + Key: [2]string{"\x1B[1m\x1B[94m", "\x1B[0m"}, + String: [2]string{"\x1B[32m", "\x1B[0m"}, + Number: [2]string{"\x1B[33m", "\x1B[0m"}, + True: [2]string{"\x1B[36m", "\x1B[0m"}, + False: [2]string{"\x1B[36m", "\x1B[0m"}, + Null: [2]string{"\x1B[2m", "\x1B[0m"}, + Escape: [2]string{"\x1B[35m", "\x1B[0m"}, + Brackets: [2]string{"\x1B[1m", "\x1B[0m"}, Append: func(dst []byte, c byte) []byte { if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') { dst = append(dst, "\\u00"...) @@ -539,13 +541,19 @@ func Color(src []byte, style *Style) []byte { } } else if src[i] == '{' || src[i] == '[' { stack = append(stack, stackt{src[i], src[i] == '{'}) + dst = append(dst, style.Brackets[0]...) dst = apnd(dst, src[i]) + dst = append(dst, style.Brackets[1]...) } else if (src[i] == '}' || src[i] == ']') && len(stack) > 0 { stack = stack[:len(stack)-1] + dst = append(dst, style.Brackets[0]...) dst = apnd(dst, src[i]) + dst = append(dst, style.Brackets[1]...) } else if (src[i] == ':' || src[i] == ',') && len(stack) > 0 && stack[len(stack)-1].kind == '{' { stack[len(stack)-1].key = !stack[len(stack)-1].key + dst = append(dst, style.Brackets[0]...) dst = apnd(dst, src[i]) + dst = append(dst, style.Brackets[1]...) } else { var kind byte if (src[i] >= '0' && src[i] <= '9') || src[i] == '-' || isNaNOrInf(src[i:]) { diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go index 5dfacbb9..661ea132 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s index f1f66230..7dd2638e 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go index 02ff3d05..db42e667 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (!arm64 && !s390x && !ppc64le) || !gc || purego -// +build !arm64,!s390x,!ppc64le !gc purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go index da420b2e..3a4287f9 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s index 5c0fed26..66aebae2 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s @@ -20,7 +20,6 @@ // due to the calling conventions and initialization of constants. //go:build gc && !purego -// +build gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go index 4652247b..683ccfd1 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s index f3ef5a01..1eda91a3 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego #include "go_asm.h" #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go index edcf163c..70c54169 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go @@ -1,7 +1,6 @@ // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. //go:build amd64 && gc && !purego -// +build amd64,gc,!purego package field diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s index 293f013c..60817acc 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s @@ -1,7 +1,6 @@ // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. //go:build amd64 && gc && !purego -// +build amd64,gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go index ddb6c9b8..9da280d1 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !amd64 || !gc || purego -// +build !amd64 !gc purego package field diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go index af459ef5..075fe9b9 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && gc && !purego -// +build arm64,gc,!purego package field diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s index 5c91e458..3126a434 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && gc && !purego -// +build arm64,gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go index 234a5b2e..fc029ac1 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !arm64 || !gc || purego -// +build !arm64 !gc purego package field diff --git a/vendor/golang.org/x/crypto/internal/alias/alias.go b/vendor/golang.org/x/crypto/internal/alias/alias.go index 69c17f82..551ff0c3 100644 --- a/vendor/golang.org/x/crypto/internal/alias/alias.go +++ b/vendor/golang.org/x/crypto/internal/alias/alias.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !purego -// +build !purego // Package alias implements memory aliasing tests. package alias diff --git a/vendor/golang.org/x/crypto/internal/alias/alias_purego.go b/vendor/golang.org/x/crypto/internal/alias/alias_purego.go index 4775b0a4..6fe61b5c 100644 --- a/vendor/golang.org/x/crypto/internal/alias/alias_purego.go +++ b/vendor/golang.org/x/crypto/internal/alias/alias_purego.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build purego -// +build purego // Package alias implements memory aliasing tests. package alias diff --git a/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go b/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go deleted file mode 100644 index 45b5c966..00000000 --- a/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.13 -// +build !go1.13 - -package poly1305 - -// Generic fallbacks for the math/bits intrinsics, copied from -// src/math/bits/bits.go. They were added in Go 1.12, but Add64 and Sum64 had -// variable time fallbacks until Go 1.13. - -func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) { - sum = x + y + carry - carryOut = ((x & y) | ((x | y) &^ sum)) >> 63 - return -} - -func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) { - diff = x - y - borrow - borrowOut = ((^x & y) | (^(x ^ y) & diff)) >> 63 - return -} - -func bitsMul64(x, y uint64) (hi, lo uint64) { - const mask32 = 1<<32 - 1 - x0 := x & mask32 - x1 := x >> 32 - y0 := y & mask32 - y1 := y >> 32 - w0 := x0 * y0 - t := x1*y0 + w0>>32 - w1 := t & mask32 - w2 := t >> 32 - w1 += x0 * y1 - hi = x1*y1 + w2 + w1>>32 - lo = x * y - return -} diff --git a/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go b/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go deleted file mode 100644 index ed52b341..00000000 --- a/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.13 -// +build go1.13 - -package poly1305 - -import "math/bits" - -func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) { - return bits.Add64(x, y, carry) -} - -func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) { - return bits.Sub64(x, y, borrow) -} - -func bitsMul64(x, y uint64) (hi, lo uint64) { - return bits.Mul64(x, y) -} diff --git a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go index f184b67d..333da285 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (!amd64 && !ppc64le && !s390x) || !gc || purego -// +build !amd64,!ppc64le,!s390x !gc purego package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go index 6d522333..164cd47d 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s index 1d74f0f8..e0d3c647 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go index e041da5e..ec2202bd 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go @@ -7,7 +7,10 @@ package poly1305 -import "encoding/binary" +import ( + "encoding/binary" + "math/bits" +) // Poly1305 [RFC 7539] is a relatively simple algorithm: the authentication tag // for a 64 bytes message is approximately @@ -114,13 +117,13 @@ type uint128 struct { } func mul64(a, b uint64) uint128 { - hi, lo := bitsMul64(a, b) + hi, lo := bits.Mul64(a, b) return uint128{lo, hi} } func add128(a, b uint128) uint128 { - lo, c := bitsAdd64(a.lo, b.lo, 0) - hi, c := bitsAdd64(a.hi, b.hi, c) + lo, c := bits.Add64(a.lo, b.lo, 0) + hi, c := bits.Add64(a.hi, b.hi, c) if c != 0 { panic("poly1305: unexpected overflow") } @@ -155,8 +158,8 @@ func updateGeneric(state *macState, msg []byte) { // hide leading zeroes. For full chunks, that's 1 << 128, so we can just // add 1 to the most significant (2¹²⁸) limb, h2. if len(msg) >= TagSize { - h0, c = bitsAdd64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0) - h1, c = bitsAdd64(h1, binary.LittleEndian.Uint64(msg[8:16]), c) + h0, c = bits.Add64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0) + h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(msg[8:16]), c) h2 += c + 1 msg = msg[TagSize:] @@ -165,8 +168,8 @@ func updateGeneric(state *macState, msg []byte) { copy(buf[:], msg) buf[len(msg)] = 1 - h0, c = bitsAdd64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0) - h1, c = bitsAdd64(h1, binary.LittleEndian.Uint64(buf[8:16]), c) + h0, c = bits.Add64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0) + h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(buf[8:16]), c) h2 += c msg = nil @@ -219,9 +222,9 @@ func updateGeneric(state *macState, msg []byte) { m3 := h2r1 t0 := m0.lo - t1, c := bitsAdd64(m1.lo, m0.hi, 0) - t2, c := bitsAdd64(m2.lo, m1.hi, c) - t3, _ := bitsAdd64(m3.lo, m2.hi, c) + t1, c := bits.Add64(m1.lo, m0.hi, 0) + t2, c := bits.Add64(m2.lo, m1.hi, c) + t3, _ := bits.Add64(m3.lo, m2.hi, c) // Now we have the result as 4 64-bit limbs, and we need to reduce it // modulo 2¹³⁰ - 5. The special shape of this Crandall prime lets us do @@ -243,14 +246,14 @@ func updateGeneric(state *macState, msg []byte) { // To add c * 5 to h, we first add cc = c * 4, and then add (cc >> 2) = c. - h0, c = bitsAdd64(h0, cc.lo, 0) - h1, c = bitsAdd64(h1, cc.hi, c) + h0, c = bits.Add64(h0, cc.lo, 0) + h1, c = bits.Add64(h1, cc.hi, c) h2 += c cc = shiftRightBy2(cc) - h0, c = bitsAdd64(h0, cc.lo, 0) - h1, c = bitsAdd64(h1, cc.hi, c) + h0, c = bits.Add64(h0, cc.lo, 0) + h1, c = bits.Add64(h1, cc.hi, c) h2 += c // h2 is at most 3 + 1 + 1 = 5, making the whole of h at most @@ -287,9 +290,9 @@ func finalize(out *[TagSize]byte, h *[3]uint64, s *[2]uint64) { // in constant time, we compute t = h - (2¹³⁰ - 5), and select h as the // result if the subtraction underflows, and t otherwise. - hMinusP0, b := bitsSub64(h0, p0, 0) - hMinusP1, b := bitsSub64(h1, p1, b) - _, b = bitsSub64(h2, p2, b) + hMinusP0, b := bits.Sub64(h0, p0, 0) + hMinusP1, b := bits.Sub64(h1, p1, b) + _, b = bits.Sub64(h2, p2, b) // h = h if h < p else h - p h0 = select64(b, h0, hMinusP0) @@ -301,8 +304,8 @@ func finalize(out *[TagSize]byte, h *[3]uint64, s *[2]uint64) { // // by just doing a wide addition with the 128 low bits of h and discarding // the overflow. - h0, c := bitsAdd64(h0, s[0], 0) - h1, _ = bitsAdd64(h1, s[1], c) + h0, c := bits.Add64(h0, s[0], 0) + h1, _ = bits.Add64(h1, s[1], c) binary.LittleEndian.PutUint64(out[0:8], h0) binary.LittleEndian.PutUint64(out[8:16], h1) diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go index 4a069941..4aec4874 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s index 58422aad..b3c1699b 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego #include "textflag.h" @@ -20,15 +19,14 @@ #define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3, t4, t5) \ MULLD r0, h0, t0; \ - MULLD r0, h1, t4; \ MULHDU r0, h0, t1; \ + MULLD r0, h1, t4; \ MULHDU r0, h1, t5; \ ADDC t4, t1, t1; \ MULLD r0, h2, t2; \ - ADDZE t5; \ MULHDU r1, h0, t4; \ MULLD r1, h0, h0; \ - ADD t5, t2, t2; \ + ADDE t5, t2, t2; \ ADDC h0, t1, t1; \ MULLD h2, r1, t3; \ ADDZE t4, h0; \ @@ -38,13 +36,11 @@ ADDE t5, t3, t3; \ ADDC h0, t2, t2; \ MOVD $-4, t4; \ - MOVD t0, h0; \ - MOVD t1, h1; \ ADDZE t3; \ - ANDCC $3, t2, h2; \ - AND t2, t4, t0; \ + RLDICL $0, t2, $62, h2; \ + AND t2, t4, h0; \ ADDC t0, h0, h0; \ - ADDE t3, h1, h1; \ + ADDE t3, t1, h1; \ SLD $62, t3, t4; \ SRD $2, t2; \ ADDZE h2; \ @@ -76,6 +72,7 @@ TEXT ·update(SB), $0-32 loop: POLY1305_ADD(R4, R8, R9, R10, R20, R21, R22) + PCALIGN $16 multiply: POLY1305_MUL(R8, R9, R10, R11, R12, R16, R17, R18, R14, R20, R21) ADD $-16, R5 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go index ec959668..e1d033a4 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego package poly1305 diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s index aa9e0494..0fe3a7c2 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc && !purego -// +build gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/golang.org/x/crypto/ssh/channel.go index c0834c00..cc0bb7ab 100644 --- a/vendor/golang.org/x/crypto/ssh/channel.go +++ b/vendor/golang.org/x/crypto/ssh/channel.go @@ -187,9 +187,11 @@ type channel struct { pending *buffer extPending *buffer - // windowMu protects myWindow, the flow-control window. - windowMu sync.Mutex - myWindow uint32 + // windowMu protects myWindow, the flow-control window, and myConsumed, + // the number of bytes consumed since we last increased myWindow + windowMu sync.Mutex + myWindow uint32 + myConsumed uint32 // writeMu serializes calls to mux.conn.writePacket() and // protects sentClose and packetPool. This mutex must be @@ -332,14 +334,24 @@ func (ch *channel) handleData(packet []byte) error { return nil } -func (c *channel) adjustWindow(n uint32) error { +func (c *channel) adjustWindow(adj uint32) error { c.windowMu.Lock() - // Since myWindow is managed on our side, and can never exceed - // the initial window setting, we don't worry about overflow. - c.myWindow += uint32(n) + // Since myConsumed and myWindow are managed on our side, and can never + // exceed the initial window setting, we don't worry about overflow. + c.myConsumed += adj + var sendAdj uint32 + if (channelWindowSize-c.myWindow > 3*c.maxIncomingPayload) || + (c.myWindow < channelWindowSize/2) { + sendAdj = c.myConsumed + c.myConsumed = 0 + c.myWindow += sendAdj + } c.windowMu.Unlock() + if sendAdj == 0 { + return nil + } return c.sendMessage(windowAdjustMsg{ - AdditionalBytes: uint32(n), + AdditionalBytes: sendAdj, }) } diff --git a/vendor/golang.org/x/crypto/ssh/client.go b/vendor/golang.org/x/crypto/ssh/client.go index bdc356cb..fd8c4974 100644 --- a/vendor/golang.org/x/crypto/ssh/client.go +++ b/vendor/golang.org/x/crypto/ssh/client.go @@ -82,7 +82,7 @@ func NewClientConn(c net.Conn, addr string, config *ClientConfig) (Conn, <-chan if err := conn.clientHandshake(addr, &fullConf); err != nil { c.Close() - return nil, nil, nil, fmt.Errorf("ssh: handshake failed: %v", err) + return nil, nil, nil, fmt.Errorf("ssh: handshake failed: %w", err) } conn.mux = newMux(conn.transport) return conn, conn.mux.incomingChannels, conn.mux.incomingRequests, nil diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index 5c3bc257..34bf089d 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -307,7 +307,10 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand } var methods []string var errSigAlgo error - for _, signer := range signers { + + origSignersLen := len(signers) + for idx := 0; idx < len(signers); idx++ { + signer := signers[idx] pub := signer.PublicKey() as, algo, err := pickSignatureAlgorithm(signer, extensions) if err != nil && errSigAlgo == nil { @@ -321,6 +324,21 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand if err != nil { return authFailure, nil, err } + // OpenSSH 7.2-7.7 advertises support for rsa-sha2-256 and rsa-sha2-512 + // in the "server-sig-algs" extension but doesn't support these + // algorithms for certificate authentication, so if the server rejects + // the key try to use the obtained algorithm as if "server-sig-algs" had + // not been implemented if supported from the algorithm signer. + if !ok && idx < origSignersLen && isRSACert(algo) && algo != CertAlgoRSAv01 { + if contains(as.Algorithms(), KeyAlgoRSA) { + // We retry using the compat algorithm after all signers have + // been tried normally. + signers = append(signers, &multiAlgorithmSigner{ + AlgorithmSigner: as, + supportedAlgorithms: []string{KeyAlgoRSA}, + }) + } + } if !ok { continue } diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go index b419c761..7e9c2cbc 100644 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -10,7 +10,6 @@ import ( "fmt" "io" "math" - "strings" "sync" _ "crypto/sha1" @@ -128,6 +127,14 @@ func isRSA(algo string) bool { return contains(algos, underlyingAlgo(algo)) } +func isRSACert(algo string) bool { + _, ok := certKeyAlgoNames[algo] + if !ok { + return false + } + return isRSA(algo) +} + // supportedPubKeyAuthAlgos specifies the supported client public key // authentication algorithms. Note that this doesn't include certificate types // since those use the underlying algorithm. This list is sent to the client if @@ -140,8 +147,6 @@ var supportedPubKeyAuthAlgos = []string{ KeyAlgoDSA, } -var supportedPubKeyAuthAlgosList = strings.Join(supportedPubKeyAuthAlgos, ",") - // unexpectedMessageError results when the SSH message that we received didn't // match what we wanted. func unexpectedMessageError(expected, got uint8) error { diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go index 70a7369f..56cdc7c2 100644 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -11,6 +11,7 @@ import ( "io" "log" "net" + "strings" "sync" ) @@ -34,6 +35,16 @@ type keyingTransport interface { // direction will be effected if a msgNewKeys message is sent // or received. prepareKeyChange(*algorithms, *kexResult) error + + // setStrictMode sets the strict KEX mode, notably triggering + // sequence number resets on sending or receiving msgNewKeys. + // If the sequence number is already > 1 when setStrictMode + // is called, an error is returned. + setStrictMode() error + + // setInitialKEXDone indicates to the transport that the initial key exchange + // was completed + setInitialKEXDone() } // handshakeTransport implements rekeying on top of a keyingTransport @@ -50,6 +61,10 @@ type handshakeTransport struct { // connection. hostKeys []Signer + // publicKeyAuthAlgorithms is non-empty if we are the server. In that case, + // it contains the supported client public key authentication algorithms. + publicKeyAuthAlgorithms []string + // hostKeyAlgorithms is non-empty if we are the client. In that case, // we accept these key types from the server as host key. hostKeyAlgorithms []string @@ -95,6 +110,10 @@ type handshakeTransport struct { // The session ID or nil if first kex did not complete yet. sessionID []byte + + // strictMode indicates if the other side of the handshake indicated + // that we should be following the strict KEX protocol restrictions. + strictMode bool } type pendingKex struct { @@ -141,6 +160,7 @@ func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byt func newServerTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ServerConfig) *handshakeTransport { t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) t.hostKeys = config.hostKeys + t.publicKeyAuthAlgorithms = config.PublicKeyAuthAlgorithms go t.readLoop() go t.kexLoop() return t @@ -203,7 +223,10 @@ func (t *handshakeTransport) readLoop() { close(t.incoming) break } - if p[0] == msgIgnore || p[0] == msgDebug { + // If this is the first kex, and strict KEX mode is enabled, + // we don't ignore any messages, as they may be used to manipulate + // the packet sequence numbers. + if !(t.sessionID == nil && t.strictMode) && (p[0] == msgIgnore || p[0] == msgDebug) { continue } t.incoming <- p @@ -435,6 +458,11 @@ func (t *handshakeTransport) readOnePacket(first bool) ([]byte, error) { return successPacket, nil } +const ( + kexStrictClient = "kex-strict-c-v00@openssh.com" + kexStrictServer = "kex-strict-s-v00@openssh.com" +) + // sendKexInit sends a key change message. func (t *handshakeTransport) sendKexInit() error { t.mu.Lock() @@ -448,7 +476,6 @@ func (t *handshakeTransport) sendKexInit() error { } msg := &kexInitMsg{ - KexAlgos: t.config.KeyExchanges, CiphersClientServer: t.config.Ciphers, CiphersServerClient: t.config.Ciphers, MACsClientServer: t.config.MACs, @@ -458,6 +485,13 @@ func (t *handshakeTransport) sendKexInit() error { } io.ReadFull(rand.Reader, msg.Cookie[:]) + // We mutate the KexAlgos slice, in order to add the kex-strict extension algorithm, + // and possibly to add the ext-info extension algorithm. Since the slice may be the + // user owned KeyExchanges, we create our own slice in order to avoid using user + // owned memory by mistake. + msg.KexAlgos = make([]string, 0, len(t.config.KeyExchanges)+2) // room for kex-strict and ext-info + msg.KexAlgos = append(msg.KexAlgos, t.config.KeyExchanges...) + isServer := len(t.hostKeys) > 0 if isServer { for _, k := range t.hostKeys { @@ -482,17 +516,24 @@ func (t *handshakeTransport) sendKexInit() error { msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, keyFormat) } } + + if t.sessionID == nil { + msg.KexAlgos = append(msg.KexAlgos, kexStrictServer) + } } else { msg.ServerHostKeyAlgos = t.hostKeyAlgorithms // As a client we opt in to receiving SSH_MSG_EXT_INFO so we know what // algorithms the server supports for public key authentication. See RFC // 8308, Section 2.1. + // + // We also send the strict KEX mode extension algorithm, in order to opt + // into the strict KEX mode. if firstKeyExchange := t.sessionID == nil; firstKeyExchange { - msg.KexAlgos = make([]string, 0, len(t.config.KeyExchanges)+1) - msg.KexAlgos = append(msg.KexAlgos, t.config.KeyExchanges...) msg.KexAlgos = append(msg.KexAlgos, "ext-info-c") + msg.KexAlgos = append(msg.KexAlgos, kexStrictClient) } + } packet := Marshal(msg) @@ -598,6 +639,13 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { return err } + if t.sessionID == nil && ((isClient && contains(serverInit.KexAlgos, kexStrictServer)) || (!isClient && contains(clientInit.KexAlgos, kexStrictClient))) { + t.strictMode = true + if err := t.conn.setStrictMode(); err != nil { + return err + } + } + // We don't send FirstKexFollows, but we handle receiving it. // // RFC 4253 section 7 defines the kex and the agreement method for @@ -649,6 +697,7 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { // message with the server-sig-algs extension if the client supports it. See // RFC 8308, Sections 2.4 and 3.1, and [PROTOCOL], Section 1.9. if !isClient && firstKeyExchange && contains(clientInit.KexAlgos, "ext-info-c") { + supportedPubKeyAuthAlgosList := strings.Join(t.publicKeyAuthAlgorithms, ",") extInfo := &extInfoMsg{ NumExtensions: 2, Payload: make([]byte, 0, 4+15+4+len(supportedPubKeyAuthAlgosList)+4+16+4+1), @@ -672,6 +721,12 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { return unexpectedMessageError(msgNewKeys, packet[0]) } + if firstKeyExchange { + // Indicates to the transport that the first key exchange is completed + // after receiving SSH_MSG_NEWKEYS. + t.conn.setInitialKEXDone() + } + return nil } diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index ef1bad73..df4ebdad 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -1232,16 +1232,27 @@ func ParseRawPrivateKeyWithPassphrase(pemBytes, passphrase []byte) (interface{}, return nil, fmt.Errorf("ssh: cannot decode encrypted private keys: %v", err) } + var result interface{} + switch block.Type { case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(buf) + result, err = x509.ParsePKCS1PrivateKey(buf) case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(buf) + result, err = x509.ParseECPrivateKey(buf) case "DSA PRIVATE KEY": - return ParseDSAPrivateKey(buf) + result, err = ParseDSAPrivateKey(buf) default: - return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) + err = fmt.Errorf("ssh: unsupported key type %q", block.Type) } + // Because of deficiencies in the format, DecryptPEMBlock does not always + // detect an incorrect password. In these cases decrypted DER bytes is + // random noise. If the parsing of the key returns an asn1.StructuralError + // we return x509.IncorrectPasswordError. + if _, ok := err.(asn1.StructuralError); ok { + return nil, x509.IncorrectPasswordError + } + + return result, err } // ParseDSAPrivateKey returns a DSA private key from its ASN.1 DER encoding, as diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 727c71b9..c2dfe326 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -64,6 +64,13 @@ type ServerConfig struct { // Config contains configuration shared between client and server. Config + // PublicKeyAuthAlgorithms specifies the supported client public key + // authentication algorithms. Note that this should not include certificate + // types since those use the underlying algorithm. This list is sent to the + // client if it supports the server-sig-algs extension. Order is irrelevant. + // If unspecified then a default set of algorithms is used. + PublicKeyAuthAlgorithms []string + hostKeys []Signer // NoClientAuth is true if clients are allowed to connect without @@ -201,9 +208,20 @@ func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewCha if fullConf.MaxAuthTries == 0 { fullConf.MaxAuthTries = 6 } + if len(fullConf.PublicKeyAuthAlgorithms) == 0 { + fullConf.PublicKeyAuthAlgorithms = supportedPubKeyAuthAlgos + } else { + for _, algo := range fullConf.PublicKeyAuthAlgorithms { + if !contains(supportedPubKeyAuthAlgos, algo) { + c.Close() + return nil, nil, nil, fmt.Errorf("ssh: unsupported public key authentication algorithm %s", algo) + } + } + } // Check if the config contains any unsupported key exchanges for _, kex := range fullConf.KeyExchanges { if _, ok := serverForbiddenKexAlgos[kex]; ok { + c.Close() return nil, nil, nil, fmt.Errorf("ssh: unsupported key exchange %s for server", kex) } } @@ -321,7 +339,7 @@ func checkSourceAddress(addr net.Addr, sourceAddrs string) error { return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr) } -func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *connection, +func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, token []byte, s *connection, sessionID []byte, userAuthReq userAuthRequestMsg) (authErr error, perms *Permissions, err error) { gssAPIServer := gssapiConfig.Server defer gssAPIServer.DeleteSecContext() @@ -331,7 +349,7 @@ func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *c outToken []byte needContinue bool ) - outToken, srcName, needContinue, err = gssAPIServer.AcceptSecContext(firstToken) + outToken, srcName, needContinue, err = gssAPIServer.AcceptSecContext(token) if err != nil { return err, nil, nil } @@ -353,6 +371,7 @@ func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *c if err := Unmarshal(packet, userAuthGSSAPITokenReq); err != nil { return nil, nil, err } + token = userAuthGSSAPITokenReq.Token } packet, err := s.transport.readPacket() if err != nil { @@ -524,7 +543,7 @@ userAuthLoop: return nil, parseError(msgUserAuthRequest) } algo := string(algoBytes) - if !contains(supportedPubKeyAuthAlgos, underlyingAlgo(algo)) { + if !contains(config.PublicKeyAuthAlgorithms, underlyingAlgo(algo)) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) break } @@ -591,7 +610,7 @@ userAuthLoop: // algorithm name that corresponds to algo with // sig.Format. This is usually the same, but // for certs, the names differ. - if !contains(supportedPubKeyAuthAlgos, sig.Format) { + if !contains(config.PublicKeyAuthAlgorithms, sig.Format) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } diff --git a/vendor/golang.org/x/crypto/ssh/tcpip.go b/vendor/golang.org/x/crypto/ssh/tcpip.go index 80d35f5e..ef5059a1 100644 --- a/vendor/golang.org/x/crypto/ssh/tcpip.go +++ b/vendor/golang.org/x/crypto/ssh/tcpip.go @@ -5,6 +5,7 @@ package ssh import ( + "context" "errors" "fmt" "io" @@ -332,6 +333,40 @@ func (l *tcpListener) Addr() net.Addr { return l.laddr } +// DialContext initiates a connection to the addr from the remote host. +// +// The provided Context must be non-nil. If the context expires before the +// connection is complete, an error is returned. Once successfully connected, +// any expiration of the context will not affect the connection. +// +// See func Dial for additional information. +func (c *Client) DialContext(ctx context.Context, n, addr string) (net.Conn, error) { + if err := ctx.Err(); err != nil { + return nil, err + } + type connErr struct { + conn net.Conn + err error + } + ch := make(chan connErr) + go func() { + conn, err := c.Dial(n, addr) + select { + case ch <- connErr{conn, err}: + case <-ctx.Done(): + if conn != nil { + conn.Close() + } + } + }() + select { + case res := <-ch: + return res.conn, res.err + case <-ctx.Done(): + return nil, ctx.Err() + } +} + // Dial initiates a connection to the addr from the remote host. // The resulting connection has a zero LocalAddr() and RemoteAddr(). func (c *Client) Dial(n, addr string) (net.Conn, error) { diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go index da015801..0424d2d3 100644 --- a/vendor/golang.org/x/crypto/ssh/transport.go +++ b/vendor/golang.org/x/crypto/ssh/transport.go @@ -49,6 +49,9 @@ type transport struct { rand io.Reader isClient bool io.Closer + + strictMode bool + initialKEXDone bool } // packetCipher represents a combination of SSH encryption/MAC @@ -74,6 +77,18 @@ type connectionState struct { pendingKeyChange chan packetCipher } +func (t *transport) setStrictMode() error { + if t.reader.seqNum != 1 { + return errors.New("ssh: sequence number != 1 when strict KEX mode requested") + } + t.strictMode = true + return nil +} + +func (t *transport) setInitialKEXDone() { + t.initialKEXDone = true +} + // prepareKeyChange sets up key material for a keychange. The key changes in // both directions are triggered by reading and writing a msgNewKey packet // respectively. @@ -112,11 +127,12 @@ func (t *transport) printPacket(p []byte, write bool) { // Read and decrypt next packet. func (t *transport) readPacket() (p []byte, err error) { for { - p, err = t.reader.readPacket(t.bufReader) + p, err = t.reader.readPacket(t.bufReader, t.strictMode) if err != nil { break } - if len(p) == 0 || (p[0] != msgIgnore && p[0] != msgDebug) { + // in strict mode we pass through DEBUG and IGNORE packets only during the initial KEX + if len(p) == 0 || (t.strictMode && !t.initialKEXDone) || (p[0] != msgIgnore && p[0] != msgDebug) { break } } @@ -127,7 +143,7 @@ func (t *transport) readPacket() (p []byte, err error) { return p, err } -func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) { +func (s *connectionState) readPacket(r *bufio.Reader, strictMode bool) ([]byte, error) { packet, err := s.packetCipher.readCipherPacket(s.seqNum, r) s.seqNum++ if err == nil && len(packet) == 0 { @@ -140,6 +156,9 @@ func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) { select { case cipher := <-s.pendingKeyChange: s.packetCipher = cipher + if strictMode { + s.seqNum = 0 + } default: return nil, errors.New("ssh: got bogus newkeys message") } @@ -170,10 +189,10 @@ func (t *transport) writePacket(packet []byte) error { if debugTransport { t.printPacket(packet, true) } - return t.writer.writePacket(t.bufWriter, t.rand, packet) + return t.writer.writePacket(t.bufWriter, t.rand, packet, t.strictMode) } -func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte) error { +func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte, strictMode bool) error { changeKeys := len(packet) > 0 && packet[0] == msgNewKeys err := s.packetCipher.writeCipherPacket(s.seqNum, w, rand, packet) @@ -188,6 +207,9 @@ func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet [] select { case cipher := <-s.pendingKeyChange: s.packetCipher = cipher + if strictMode { + s.seqNum = 0 + } default: panic("ssh: no key material for msgNewKeys") } diff --git a/vendor/golang.org/x/exp/LICENSE b/vendor/golang.org/x/exp/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/exp/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/exp/PATENTS b/vendor/golang.org/x/exp/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/exp/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/exp/maps/maps.go b/vendor/golang.org/x/exp/maps/maps.go deleted file mode 100644 index ecc0dabb..00000000 --- a/vendor/golang.org/x/exp/maps/maps.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package maps defines various functions useful with maps of any type. -package maps - -// Keys returns the keys of the map m. -// The keys will be in an indeterminate order. -func Keys[M ~map[K]V, K comparable, V any](m M) []K { - r := make([]K, 0, len(m)) - for k := range m { - r = append(r, k) - } - return r -} - -// Values returns the values of the map m. -// The values will be in an indeterminate order. -func Values[M ~map[K]V, K comparable, V any](m M) []V { - r := make([]V, 0, len(m)) - for _, v := range m { - r = append(r, v) - } - return r -} - -// Equal reports whether two maps contain the same key/value pairs. -// Values are compared using ==. -func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool { - if len(m1) != len(m2) { - return false - } - for k, v1 := range m1 { - if v2, ok := m2[k]; !ok || v1 != v2 { - return false - } - } - return true -} - -// EqualFunc is like Equal, but compares values using eq. -// Keys are still compared with ==. -func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M2, eq func(V1, V2) bool) bool { - if len(m1) != len(m2) { - return false - } - for k, v1 := range m1 { - if v2, ok := m2[k]; !ok || !eq(v1, v2) { - return false - } - } - return true -} - -// Clear removes all entries from m, leaving it empty. -func Clear[M ~map[K]V, K comparable, V any](m M) { - for k := range m { - delete(m, k) - } -} - -// Clone returns a copy of m. This is a shallow clone: -// the new keys and values are set using ordinary assignment. -func Clone[M ~map[K]V, K comparable, V any](m M) M { - // Preserve nil in case it matters. - if m == nil { - return nil - } - r := make(M, len(m)) - for k, v := range m { - r[k] = v - } - return r -} - -// Copy copies all key/value pairs in src adding them to dst. -// When a key in src is already present in dst, -// the value in dst will be overwritten by the value associated -// with the key in src. -func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2) { - for k, v := range src { - dst[k] = v - } -} - -// DeleteFunc deletes any key/value pairs from m for which del returns true. -func DeleteFunc[M ~map[K]V, K comparable, V any](m M, del func(K, V) bool) { - for k, v := range m { - if del(k, v) { - delete(m, k) - } - } -} diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/net/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/net/PATENTS b/vendor/golang.org/x/net/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/net/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go deleted file mode 100644 index cf66309c..00000000 --- a/vendor/golang.org/x/net/context/context.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package context defines the Context type, which carries deadlines, -// cancelation signals, and other request-scoped values across API boundaries -// and between processes. -// As of Go 1.7 this package is available in the standard library under the -// name context. https://golang.org/pkg/context. -// -// Incoming requests to a server should create a Context, and outgoing calls to -// servers should accept a Context. The chain of function calls between must -// propagate the Context, optionally replacing it with a modified copy created -// using WithDeadline, WithTimeout, WithCancel, or WithValue. -// -// Programs that use Contexts should follow these rules to keep interfaces -// consistent across packages and enable static analysis tools to check context -// propagation: -// -// Do not store Contexts inside a struct type; instead, pass a Context -// explicitly to each function that needs it. The Context should be the first -// parameter, typically named ctx: -// -// func DoSomething(ctx context.Context, arg Arg) error { -// // ... use ctx ... -// } -// -// Do not pass a nil Context, even if a function permits it. Pass context.TODO -// if you are unsure about which Context to use. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -// -// The same Context may be passed to functions running in different goroutines; -// Contexts are safe for simultaneous use by multiple goroutines. -// -// See http://blog.golang.org/context for example code for a server that uses -// Contexts. -package context // import "golang.org/x/net/context" - -// Background returns a non-nil, empty Context. It is never canceled, has no -// values, and has no deadline. It is typically used by the main function, -// initialization, and tests, and as the top-level Context for incoming -// requests. -func Background() Context { - return background -} - -// TODO returns a non-nil, empty Context. Code should use context.TODO when -// it's unclear which Context to use or it is not yet available (because the -// surrounding function has not yet been extended to accept a Context -// parameter). TODO is recognized by static analysis tools that determine -// whether Contexts are propagated correctly in a program. -func TODO() Context { - return todo -} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go deleted file mode 100644 index 37dc0cfd..00000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ctxhttp provides helper functions for performing context-aware HTTP requests. -package ctxhttp // import "golang.org/x/net/context/ctxhttp" - -import ( - "context" - "io" - "net/http" - "net/url" - "strings" -) - -// Do sends an HTTP request with the provided http.Client and returns -// an HTTP response. -// -// If the client is nil, http.DefaultClient is used. -// -// The provided ctx must be non-nil. If it is canceled or times out, -// ctx.Err() will be returned. -func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - resp, err := client.Do(req.WithContext(ctx)) - // If we got an error, and the context has been canceled, - // the context's error is probably more useful. - if err != nil { - select { - case <-ctx.Done(): - err = ctx.Err() - default: - } - } - return resp, err -} - -// Get issues a GET request via the Do function. -func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Head issues a HEAD request via the Do function. -func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Post issues a POST request via the Do function. -func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { - req, err := http.NewRequest("POST", url, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", bodyType) - return Do(ctx, client, req) -} - -// PostForm issues a POST request via the Do function. -func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { - return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go deleted file mode 100644 index 2cb9c408..00000000 --- a/vendor/golang.org/x/net/context/go17.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.7 -// +build go1.7 - -package context - -import ( - "context" // standard library's context, as of Go 1.7 - "time" -) - -var ( - todo = context.TODO() - background = context.Background() -) - -// Canceled is the error returned by Context.Err when the context is canceled. -var Canceled = context.Canceled - -// DeadlineExceeded is the error returned by Context.Err when the context's -// deadline passes. -var DeadlineExceeded = context.DeadlineExceeded - -// WithCancel returns a copy of parent with a new Done channel. The returned -// context's Done channel is closed when the returned cancel function is called -// or when the parent context's Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { - ctx, f := context.WithCancel(parent) - return ctx, f -} - -// WithDeadline returns a copy of the parent context with the deadline adjusted -// to be no later than d. If the parent's deadline is already earlier than d, -// WithDeadline(parent, d) is semantically equivalent to parent. The returned -// context's Done channel is closed when the deadline expires, when the returned -// cancel function is called, or when the parent context's Done channel is -// closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { - ctx, f := context.WithDeadline(parent, deadline) - return ctx, f -} - -// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete: -// -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } -func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { - return WithDeadline(parent, time.Now().Add(timeout)) -} - -// WithValue returns a copy of parent in which the value associated with key is -// val. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -func WithValue(parent Context, key interface{}, val interface{}) Context { - return context.WithValue(parent, key, val) -} diff --git a/vendor/golang.org/x/net/context/go19.go b/vendor/golang.org/x/net/context/go19.go deleted file mode 100644 index 64d31ecc..00000000 --- a/vendor/golang.org/x/net/context/go19.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.9 -// +build go1.9 - -package context - -import "context" // standard library's context, as of Go 1.7 - -// A Context carries a deadline, a cancelation signal, and other values across -// API boundaries. -// -// Context's methods may be called by multiple goroutines simultaneously. -type Context = context.Context - -// A CancelFunc tells an operation to abandon its work. -// A CancelFunc does not wait for the work to stop. -// After the first call, subsequent calls to a CancelFunc do nothing. -type CancelFunc = context.CancelFunc diff --git a/vendor/golang.org/x/net/context/pre_go17.go b/vendor/golang.org/x/net/context/pre_go17.go deleted file mode 100644 index 7b6b6851..00000000 --- a/vendor/golang.org/x/net/context/pre_go17.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.7 -// +build !go1.7 - -package context - -import ( - "errors" - "fmt" - "sync" - "time" -) - -// An emptyCtx is never canceled, has no values, and has no deadline. It is not -// struct{}, since vars of this type must have distinct addresses. -type emptyCtx int - -func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { - return -} - -func (*emptyCtx) Done() <-chan struct{} { - return nil -} - -func (*emptyCtx) Err() error { - return nil -} - -func (*emptyCtx) Value(key interface{}) interface{} { - return nil -} - -func (e *emptyCtx) String() string { - switch e { - case background: - return "context.Background" - case todo: - return "context.TODO" - } - return "unknown empty Context" -} - -var ( - background = new(emptyCtx) - todo = new(emptyCtx) -) - -// Canceled is the error returned by Context.Err when the context is canceled. -var Canceled = errors.New("context canceled") - -// DeadlineExceeded is the error returned by Context.Err when the context's -// deadline passes. -var DeadlineExceeded = errors.New("context deadline exceeded") - -// WithCancel returns a copy of parent with a new Done channel. The returned -// context's Done channel is closed when the returned cancel function is called -// or when the parent context's Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { - c := newCancelCtx(parent) - propagateCancel(parent, c) - return c, func() { c.cancel(true, Canceled) } -} - -// newCancelCtx returns an initialized cancelCtx. -func newCancelCtx(parent Context) *cancelCtx { - return &cancelCtx{ - Context: parent, - done: make(chan struct{}), - } -} - -// propagateCancel arranges for child to be canceled when parent is. -func propagateCancel(parent Context, child canceler) { - if parent.Done() == nil { - return // parent is never canceled - } - if p, ok := parentCancelCtx(parent); ok { - p.mu.Lock() - if p.err != nil { - // parent has already been canceled - child.cancel(false, p.err) - } else { - if p.children == nil { - p.children = make(map[canceler]bool) - } - p.children[child] = true - } - p.mu.Unlock() - } else { - go func() { - select { - case <-parent.Done(): - child.cancel(false, parent.Err()) - case <-child.Done(): - } - }() - } -} - -// parentCancelCtx follows a chain of parent references until it finds a -// *cancelCtx. This function understands how each of the concrete types in this -// package represents its parent. -func parentCancelCtx(parent Context) (*cancelCtx, bool) { - for { - switch c := parent.(type) { - case *cancelCtx: - return c, true - case *timerCtx: - return c.cancelCtx, true - case *valueCtx: - parent = c.Context - default: - return nil, false - } - } -} - -// removeChild removes a context from its parent. -func removeChild(parent Context, child canceler) { - p, ok := parentCancelCtx(parent) - if !ok { - return - } - p.mu.Lock() - if p.children != nil { - delete(p.children, child) - } - p.mu.Unlock() -} - -// A canceler is a context type that can be canceled directly. The -// implementations are *cancelCtx and *timerCtx. -type canceler interface { - cancel(removeFromParent bool, err error) - Done() <-chan struct{} -} - -// A cancelCtx can be canceled. When canceled, it also cancels any children -// that implement canceler. -type cancelCtx struct { - Context - - done chan struct{} // closed by the first cancel call. - - mu sync.Mutex - children map[canceler]bool // set to nil by the first cancel call - err error // set to non-nil by the first cancel call -} - -func (c *cancelCtx) Done() <-chan struct{} { - return c.done -} - -func (c *cancelCtx) Err() error { - c.mu.Lock() - defer c.mu.Unlock() - return c.err -} - -func (c *cancelCtx) String() string { - return fmt.Sprintf("%v.WithCancel", c.Context) -} - -// cancel closes c.done, cancels each of c's children, and, if -// removeFromParent is true, removes c from its parent's children. -func (c *cancelCtx) cancel(removeFromParent bool, err error) { - if err == nil { - panic("context: internal error: missing cancel error") - } - c.mu.Lock() - if c.err != nil { - c.mu.Unlock() - return // already canceled - } - c.err = err - close(c.done) - for child := range c.children { - // NOTE: acquiring the child's lock while holding parent's lock. - child.cancel(false, err) - } - c.children = nil - c.mu.Unlock() - - if removeFromParent { - removeChild(c.Context, c) - } -} - -// WithDeadline returns a copy of the parent context with the deadline adjusted -// to be no later than d. If the parent's deadline is already earlier than d, -// WithDeadline(parent, d) is semantically equivalent to parent. The returned -// context's Done channel is closed when the deadline expires, when the returned -// cancel function is called, or when the parent context's Done channel is -// closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { - if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { - // The current deadline is already sooner than the new one. - return WithCancel(parent) - } - c := &timerCtx{ - cancelCtx: newCancelCtx(parent), - deadline: deadline, - } - propagateCancel(parent, c) - d := deadline.Sub(time.Now()) - if d <= 0 { - c.cancel(true, DeadlineExceeded) // deadline has already passed - return c, func() { c.cancel(true, Canceled) } - } - c.mu.Lock() - defer c.mu.Unlock() - if c.err == nil { - c.timer = time.AfterFunc(d, func() { - c.cancel(true, DeadlineExceeded) - }) - } - return c, func() { c.cancel(true, Canceled) } -} - -// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to -// implement Done and Err. It implements cancel by stopping its timer then -// delegating to cancelCtx.cancel. -type timerCtx struct { - *cancelCtx - timer *time.Timer // Under cancelCtx.mu. - - deadline time.Time -} - -func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { - return c.deadline, true -} - -func (c *timerCtx) String() string { - return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) -} - -func (c *timerCtx) cancel(removeFromParent bool, err error) { - c.cancelCtx.cancel(false, err) - if removeFromParent { - // Remove this timerCtx from its parent cancelCtx's children. - removeChild(c.cancelCtx.Context, c) - } - c.mu.Lock() - if c.timer != nil { - c.timer.Stop() - c.timer = nil - } - c.mu.Unlock() -} - -// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete: -// -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } -func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { - return WithDeadline(parent, time.Now().Add(timeout)) -} - -// WithValue returns a copy of parent in which the value associated with key is -// val. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -func WithValue(parent Context, key interface{}, val interface{}) Context { - return &valueCtx{parent, key, val} -} - -// A valueCtx carries a key-value pair. It implements Value for that key and -// delegates all other calls to the embedded Context. -type valueCtx struct { - Context - key, val interface{} -} - -func (c *valueCtx) String() string { - return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) -} - -func (c *valueCtx) Value(key interface{}) interface{} { - if c.key == key { - return c.val - } - return c.Context.Value(key) -} diff --git a/vendor/golang.org/x/net/context/pre_go19.go b/vendor/golang.org/x/net/context/pre_go19.go deleted file mode 100644 index 1f971534..00000000 --- a/vendor/golang.org/x/net/context/pre_go19.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.9 -// +build !go1.9 - -package context - -import "time" - -// A Context carries a deadline, a cancelation signal, and other values across -// API boundaries. -// -// Context's methods may be called by multiple goroutines simultaneously. -type Context interface { - // Deadline returns the time when work done on behalf of this context - // should be canceled. Deadline returns ok==false when no deadline is - // set. Successive calls to Deadline return the same results. - Deadline() (deadline time.Time, ok bool) - - // Done returns a channel that's closed when work done on behalf of this - // context should be canceled. Done may return nil if this context can - // never be canceled. Successive calls to Done return the same value. - // - // WithCancel arranges for Done to be closed when cancel is called; - // WithDeadline arranges for Done to be closed when the deadline - // expires; WithTimeout arranges for Done to be closed when the timeout - // elapses. - // - // Done is provided for use in select statements: - // - // // Stream generates values with DoSomething and sends them to out - // // until DoSomething returns an error or ctx.Done is closed. - // func Stream(ctx context.Context, out chan<- Value) error { - // for { - // v, err := DoSomething(ctx) - // if err != nil { - // return err - // } - // select { - // case <-ctx.Done(): - // return ctx.Err() - // case out <- v: - // } - // } - // } - // - // See http://blog.golang.org/pipelines for more examples of how to use - // a Done channel for cancelation. - Done() <-chan struct{} - - // Err returns a non-nil error value after Done is closed. Err returns - // Canceled if the context was canceled or DeadlineExceeded if the - // context's deadline passed. No other values for Err are defined. - // After Done is closed, successive calls to Err return the same value. - Err() error - - // Value returns the value associated with this context for key, or nil - // if no value is associated with key. Successive calls to Value with - // the same key returns the same result. - // - // Use context values only for request-scoped data that transits - // processes and API boundaries, not for passing optional parameters to - // functions. - // - // A key identifies a specific value in a Context. Functions that wish - // to store values in Context typically allocate a key in a global - // variable then use that key as the argument to context.WithValue and - // Context.Value. A key can be any type that supports equality; - // packages should define keys as an unexported type to avoid - // collisions. - // - // Packages that define a Context key should provide type-safe accessors - // for the values stores using that key: - // - // // Package user defines a User type that's stored in Contexts. - // package user - // - // import "golang.org/x/net/context" - // - // // User is the type of value stored in the Contexts. - // type User struct {...} - // - // // key is an unexported type for keys defined in this package. - // // This prevents collisions with keys defined in other packages. - // type key int - // - // // userKey is the key for user.User values in Contexts. It is - // // unexported; clients use user.NewContext and user.FromContext - // // instead of using this key directly. - // var userKey key = 0 - // - // // NewContext returns a new Context that carries value u. - // func NewContext(ctx context.Context, u *User) context.Context { - // return context.WithValue(ctx, userKey, u) - // } - // - // // FromContext returns the User value stored in ctx, if any. - // func FromContext(ctx context.Context) (*User, bool) { - // u, ok := ctx.Value(userKey).(*User) - // return u, ok - // } - Value(key interface{}) interface{} -} - -// A CancelFunc tells an operation to abandon its work. -// A CancelFunc does not wait for the work to stop. -// After the first call, subsequent calls to a CancelFunc do nothing. -type CancelFunc func() diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md index 1473e129..781770c2 100644 --- a/vendor/golang.org/x/oauth2/README.md +++ b/vendor/golang.org/x/oauth2/README.md @@ -19,7 +19,7 @@ See pkg.go.dev for further documentation and examples. * [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) * [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google) -## Policy for new packages +## Policy for new endpoints We no longer accept new provider-specific packages in this repo if all they do is add a single endpoint variable. If you just want to add a @@ -29,8 +29,12 @@ package. ## Report Issues / Send Patches -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - The main issue tracker for the oauth2 repository is located at https://github.com/golang/oauth2/issues. + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. In particular: + +* Excluding trivial changes, all contributions should be connected to an existing issue. +* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted. +* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2). diff --git a/vendor/golang.org/x/oauth2/deviceauth.go b/vendor/golang.org/x/oauth2/deviceauth.go new file mode 100644 index 00000000..e99c92f3 --- /dev/null +++ b/vendor/golang.org/x/oauth2/deviceauth.go @@ -0,0 +1,198 @@ +package oauth2 + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "time" + + "golang.org/x/oauth2/internal" +) + +// https://datatracker.ietf.org/doc/html/rfc8628#section-3.5 +const ( + errAuthorizationPending = "authorization_pending" + errSlowDown = "slow_down" + errAccessDenied = "access_denied" + errExpiredToken = "expired_token" +) + +// DeviceAuthResponse describes a successful RFC 8628 Device Authorization Response +// https://datatracker.ietf.org/doc/html/rfc8628#section-3.2 +type DeviceAuthResponse struct { + // DeviceCode + DeviceCode string `json:"device_code"` + // UserCode is the code the user should enter at the verification uri + UserCode string `json:"user_code"` + // VerificationURI is where user should enter the user code + VerificationURI string `json:"verification_uri"` + // VerificationURIComplete (if populated) includes the user code in the verification URI. This is typically shown to the user in non-textual form, such as a QR code. + VerificationURIComplete string `json:"verification_uri_complete,omitempty"` + // Expiry is when the device code and user code expire + Expiry time.Time `json:"expires_in,omitempty"` + // Interval is the duration in seconds that Poll should wait between requests + Interval int64 `json:"interval,omitempty"` +} + +func (d DeviceAuthResponse) MarshalJSON() ([]byte, error) { + type Alias DeviceAuthResponse + var expiresIn int64 + if !d.Expiry.IsZero() { + expiresIn = int64(time.Until(d.Expiry).Seconds()) + } + return json.Marshal(&struct { + ExpiresIn int64 `json:"expires_in,omitempty"` + *Alias + }{ + ExpiresIn: expiresIn, + Alias: (*Alias)(&d), + }) + +} + +func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error { + type Alias DeviceAuthResponse + aux := &struct { + ExpiresIn int64 `json:"expires_in"` + // workaround misspelling of verification_uri + VerificationURL string `json:"verification_url"` + *Alias + }{ + Alias: (*Alias)(c), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + if aux.ExpiresIn != 0 { + c.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn)) + } + if c.VerificationURI == "" { + c.VerificationURI = aux.VerificationURL + } + return nil +} + +// DeviceAuth returns a device auth struct which contains a device code +// and authorization information provided for users to enter on another device. +func (c *Config) DeviceAuth(ctx context.Context, opts ...AuthCodeOption) (*DeviceAuthResponse, error) { + // https://datatracker.ietf.org/doc/html/rfc8628#section-3.1 + v := url.Values{ + "client_id": {c.ClientID}, + } + if len(c.Scopes) > 0 { + v.Set("scope", strings.Join(c.Scopes, " ")) + } + for _, opt := range opts { + opt.setValue(v) + } + return retrieveDeviceAuth(ctx, c, v) +} + +func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAuthResponse, error) { + if c.Endpoint.DeviceAuthURL == "" { + return nil, errors.New("endpoint missing DeviceAuthURL") + } + + req, err := http.NewRequest("POST", c.Endpoint.DeviceAuthURL, strings.NewReader(v.Encode())) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + req.Header.Set("Accept", "application/json") + + t := time.Now() + r, err := internal.ContextClient(ctx).Do(req) + if err != nil { + return nil, err + } + + body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20)) + if err != nil { + return nil, fmt.Errorf("oauth2: cannot auth device: %v", err) + } + if code := r.StatusCode; code < 200 || code > 299 { + return nil, &RetrieveError{ + Response: r, + Body: body, + } + } + + da := &DeviceAuthResponse{} + err = json.Unmarshal(body, &da) + if err != nil { + return nil, fmt.Errorf("unmarshal %s", err) + } + + if !da.Expiry.IsZero() { + // Make a small adjustment to account for time taken by the request + da.Expiry = da.Expiry.Add(-time.Since(t)) + } + + return da, nil +} + +// DeviceAccessToken polls the server to exchange a device code for a token. +func (c *Config) DeviceAccessToken(ctx context.Context, da *DeviceAuthResponse, opts ...AuthCodeOption) (*Token, error) { + if !da.Expiry.IsZero() { + var cancel context.CancelFunc + ctx, cancel = context.WithDeadline(ctx, da.Expiry) + defer cancel() + } + + // https://datatracker.ietf.org/doc/html/rfc8628#section-3.4 + v := url.Values{ + "client_id": {c.ClientID}, + "grant_type": {"urn:ietf:params:oauth:grant-type:device_code"}, + "device_code": {da.DeviceCode}, + } + if len(c.Scopes) > 0 { + v.Set("scope", strings.Join(c.Scopes, " ")) + } + for _, opt := range opts { + opt.setValue(v) + } + + // "If no value is provided, clients MUST use 5 as the default." + // https://datatracker.ietf.org/doc/html/rfc8628#section-3.2 + interval := da.Interval + if interval == 0 { + interval = 5 + } + + ticker := time.NewTicker(time.Duration(interval) * time.Second) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-ticker.C: + tok, err := retrieveToken(ctx, c, v) + if err == nil { + return tok, nil + } + + e, ok := err.(*RetrieveError) + if !ok { + return nil, err + } + switch e.ErrorCode { + case errSlowDown: + // https://datatracker.ietf.org/doc/html/rfc8628#section-3.5 + // "the interval MUST be increased by 5 seconds for this and all subsequent requests" + interval += 5 + ticker.Reset(time.Duration(interval) * time.Second) + case errAuthorizationPending: + // Do nothing. + case errAccessDenied, errExpiredToken: + fallthrough + default: + return tok, err + } + } + } +} diff --git a/vendor/golang.org/x/oauth2/internal/client_appengine.go b/vendor/golang.org/x/oauth2/internal/client_appengine.go index e1755d1d..d28140f7 100644 --- a/vendor/golang.org/x/oauth2/internal/client_appengine.go +++ b/vendor/golang.org/x/oauth2/internal/client_appengine.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build appengine -// +build appengine package internal diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go index c0ab196c..14989bea 100644 --- a/vendor/golang.org/x/oauth2/internal/oauth2.go +++ b/vendor/golang.org/x/oauth2/internal/oauth2.go @@ -14,7 +14,7 @@ import ( // ParseKey converts the binary contents of a private key file // to an *rsa.PrivateKey. It detects whether the private key is in a -// PEM container or not. If so, it extracts the the private key +// PEM container or not. If so, it extracts the private key // from PEM container before conversion. It only supports PEM // containers with no passphrase. func ParseKey(key []byte) (*rsa.PrivateKey, error) { diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go index 355c3869..e83ddeef 100644 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ b/vendor/golang.org/x/oauth2/internal/token.go @@ -18,9 +18,8 @@ import ( "strconv" "strings" "sync" + "sync/atomic" "time" - - "golang.org/x/net/context/ctxhttp" ) // Token represents the credentials used to authorize @@ -57,12 +56,18 @@ type Token struct { } // tokenJSON is the struct representing the HTTP response from OAuth2 -// providers returning a token in JSON form. +// providers returning a token or error in JSON form. +// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1 type tokenJSON struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` RefreshToken string `json:"refresh_token"` ExpiresIn expirationTime `json:"expires_in"` // at least PayPal returns string, while most return number + // error fields + // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 + ErrorCode string `json:"error"` + ErrorDescription string `json:"error_description"` + ErrorURI string `json:"error_uri"` } func (e *tokenJSON) expiry() (t time.Time) { @@ -111,41 +116,60 @@ const ( AuthStyleInHeader AuthStyle = 2 ) -// authStyleCache is the set of tokenURLs we've successfully used via +// LazyAuthStyleCache is a backwards compatibility compromise to let Configs +// have a lazily-initialized AuthStyleCache. +// +// The two users of this, oauth2.Config and oauth2/clientcredentials.Config, +// both would ideally just embed an unexported AuthStyleCache but because both +// were historically allowed to be copied by value we can't retroactively add an +// uncopyable Mutex to them. +// +// We could use an atomic.Pointer, but that was added recently enough (in Go +// 1.18) that we'd break Go 1.17 users where the tests as of 2023-08-03 +// still pass. By using an atomic.Value, it supports both Go 1.17 and +// copying by value, even if that's not ideal. +type LazyAuthStyleCache struct { + v atomic.Value // of *AuthStyleCache +} + +func (lc *LazyAuthStyleCache) Get() *AuthStyleCache { + if c, ok := lc.v.Load().(*AuthStyleCache); ok { + return c + } + c := new(AuthStyleCache) + if !lc.v.CompareAndSwap(nil, c) { + c = lc.v.Load().(*AuthStyleCache) + } + return c +} + +// AuthStyleCache is the set of tokenURLs we've successfully used via // RetrieveToken and which style auth we ended up using. // It's called a cache, but it doesn't (yet?) shrink. It's expected that // the set of OAuth2 servers a program contacts over time is fixed and // small. -var authStyleCache struct { - sync.Mutex - m map[string]AuthStyle // keyed by tokenURL -} - -// ResetAuthCache resets the global authentication style cache used -// for AuthStyleUnknown token requests. -func ResetAuthCache() { - authStyleCache.Lock() - defer authStyleCache.Unlock() - authStyleCache.m = nil +type AuthStyleCache struct { + mu sync.Mutex + m map[string]AuthStyle // keyed by tokenURL } // lookupAuthStyle reports which auth style we last used with tokenURL // when calling RetrieveToken and whether we have ever done so. -func lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) { - authStyleCache.Lock() - defer authStyleCache.Unlock() - style, ok = authStyleCache.m[tokenURL] +func (c *AuthStyleCache) lookupAuthStyle(tokenURL string) (style AuthStyle, ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + style, ok = c.m[tokenURL] return } // setAuthStyle adds an entry to authStyleCache, documented above. -func setAuthStyle(tokenURL string, v AuthStyle) { - authStyleCache.Lock() - defer authStyleCache.Unlock() - if authStyleCache.m == nil { - authStyleCache.m = make(map[string]AuthStyle) +func (c *AuthStyleCache) setAuthStyle(tokenURL string, v AuthStyle) { + c.mu.Lock() + defer c.mu.Unlock() + if c.m == nil { + c.m = make(map[string]AuthStyle) } - authStyleCache.m[tokenURL] = v + c.m[tokenURL] = v } // newTokenRequest returns a new *http.Request to retrieve a new token @@ -185,10 +209,10 @@ func cloneURLValues(v url.Values) url.Values { return v2 } -func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle) (*Token, error) { +func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle, styleCache *AuthStyleCache) (*Token, error) { needsAuthStyleProbe := authStyle == 0 if needsAuthStyleProbe { - if style, ok := lookupAuthStyle(tokenURL); ok { + if style, ok := styleCache.lookupAuthStyle(tokenURL); ok { authStyle = style needsAuthStyleProbe = false } else { @@ -218,7 +242,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, token, err = doTokenRoundTrip(ctx, req) } if needsAuthStyleProbe && err == nil { - setAuthStyle(tokenURL, authStyle) + styleCache.setAuthStyle(tokenURL, authStyle) } // Don't overwrite `RefreshToken` with an empty value // if this was a token refreshing request. @@ -229,7 +253,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, } func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) { - r, err := ctxhttp.Do(ctx, ContextClient(ctx), req) + r, err := ContextClient(ctx).Do(req.WithContext(ctx)) if err != nil { return nil, err } @@ -238,21 +262,29 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) { if err != nil { return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) } - if code := r.StatusCode; code < 200 || code > 299 { - return nil, &RetrieveError{ - Response: r, - Body: body, - } + + failureStatus := r.StatusCode < 200 || r.StatusCode > 299 + retrieveError := &RetrieveError{ + Response: r, + Body: body, + // attempt to populate error detail below } var token *Token content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")) switch content { case "application/x-www-form-urlencoded", "text/plain": + // some endpoints return a query string vals, err := url.ParseQuery(string(body)) if err != nil { - return nil, err + if failureStatus { + return nil, retrieveError + } + return nil, fmt.Errorf("oauth2: cannot parse response: %v", err) } + retrieveError.ErrorCode = vals.Get("error") + retrieveError.ErrorDescription = vals.Get("error_description") + retrieveError.ErrorURI = vals.Get("error_uri") token = &Token{ AccessToken: vals.Get("access_token"), TokenType: vals.Get("token_type"), @@ -267,8 +299,14 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) { default: var tj tokenJSON if err = json.Unmarshal(body, &tj); err != nil { - return nil, err + if failureStatus { + return nil, retrieveError + } + return nil, fmt.Errorf("oauth2: cannot parse json: %v", err) } + retrieveError.ErrorCode = tj.ErrorCode + retrieveError.ErrorDescription = tj.ErrorDescription + retrieveError.ErrorURI = tj.ErrorURI token = &Token{ AccessToken: tj.AccessToken, TokenType: tj.TokenType, @@ -278,17 +316,37 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) { } json.Unmarshal(body, &token.Raw) // no error checks for optional fields } + // according to spec, servers should respond status 400 in error case + // https://www.rfc-editor.org/rfc/rfc6749#section-5.2 + // but some unorthodox servers respond 200 in error case + if failureStatus || retrieveError.ErrorCode != "" { + return nil, retrieveError + } if token.AccessToken == "" { return nil, errors.New("oauth2: server response missing access_token") } return token, nil } +// mirrors oauth2.RetrieveError type RetrieveError struct { - Response *http.Response - Body []byte + Response *http.Response + Body []byte + ErrorCode string + ErrorDescription string + ErrorURI string } func (r *RetrieveError) Error() string { + if r.ErrorCode != "" { + s := fmt.Sprintf("oauth2: %q", r.ErrorCode) + if r.ErrorDescription != "" { + s += fmt.Sprintf(" %q", r.ErrorDescription) + } + if r.ErrorURI != "" { + s += fmt.Sprintf(" %q", r.ErrorURI) + } + return s + } return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body) } diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 291df5c8..90a2c3d6 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -16,6 +16,7 @@ import ( "net/url" "strings" "sync" + "time" "golang.org/x/oauth2/internal" ) @@ -57,6 +58,10 @@ type Config struct { // Scope specifies optional requested permissions. Scopes []string + + // authStyleCache caches which auth style to use when Endpoint.AuthStyle is + // the zero value (AuthStyleAutoDetect). + authStyleCache internal.LazyAuthStyleCache } // A TokenSource is anything that can return a token. @@ -70,8 +75,9 @@ type TokenSource interface { // Endpoint represents an OAuth 2.0 provider's authorization and token // endpoint URLs. type Endpoint struct { - AuthURL string - TokenURL string + AuthURL string + DeviceAuthURL string + TokenURL string // AuthStyle optionally specifies how the endpoint wants the // client ID & client secret sent. The zero value means to @@ -138,15 +144,19 @@ func SetAuthURLParam(key, value string) AuthCodeOption { // AuthCodeURL returns a URL to OAuth 2.0 provider's consent page // that asks for permissions for the required scopes explicitly. // -// State is a token to protect the user from CSRF attacks. You must -// always provide a non-empty string and validate that it matches the -// the state query parameter on your redirect callback. -// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info. +// State is an opaque value used by the client to maintain state between the +// request and callback. The authorization server includes this value when +// redirecting the user agent back to the client. // // Opts may include AccessTypeOnline or AccessTypeOffline, as well // as ApprovalForce. -// It can also be used to pass the PKCE challenge. -// See https://www.oauth.com/oauth2-servers/pkce/ for more info. +// +// To protect against CSRF attacks, opts should include a PKCE challenge +// (S256ChallengeOption). Not all servers support PKCE. An alternative is to +// generate a random state parameter and verify it after exchange. +// See https://datatracker.ietf.org/doc/html/rfc6749#section-10.12 (predating +// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and +// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches) func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string { var buf bytes.Buffer buf.WriteString(c.Endpoint.AuthURL) @@ -161,7 +171,6 @@ func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string { v.Set("scope", strings.Join(c.Scopes, " ")) } if state != "" { - // TODO(light): Docs say never to omit state; don't allow empty. v.Set("state", state) } for _, opt := range opts { @@ -206,10 +215,11 @@ func (c *Config) PasswordCredentialsToken(ctx context.Context, username, passwor // The provided context optionally controls which HTTP client is used. See the HTTPClient variable. // // The code will be in the *http.Request.FormValue("code"). Before -// calling Exchange, be sure to validate FormValue("state"). +// calling Exchange, be sure to validate FormValue("state") if you are +// using it to protect against CSRF attacks. // -// Opts may include the PKCE verifier code if previously used in AuthCodeURL. -// See https://www.oauth.com/oauth2-servers/pkce/ for more info. +// If using PKCE to protect against CSRF attacks, opts should include a +// VerifierOption. func (c *Config) Exchange(ctx context.Context, code string, opts ...AuthCodeOption) (*Token, error) { v := url.Values{ "grant_type": {"authorization_code"}, @@ -290,6 +300,8 @@ type reuseTokenSource struct { mu sync.Mutex // guards t t *Token + + expiryDelta time.Duration } // Token returns the current token if it's still valid, else will @@ -305,6 +317,7 @@ func (s *reuseTokenSource) Token() (*Token, error) { if err != nil { return nil, err } + t.expiryDelta = s.expiryDelta s.t = t return t, nil } @@ -379,3 +392,30 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource { new: src, } } + +// ReuseTokenSource returns a TokenSource that acts in the same manner as the +// TokenSource returned by ReuseTokenSource, except the expiry buffer is +// configurable. The expiration time of a token is calculated as +// t.Expiry.Add(-earlyExpiry). +func ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource { + // Don't wrap a reuseTokenSource in itself. That would work, + // but cause an unnecessary number of mutex operations. + // Just build the equivalent one. + if rt, ok := src.(*reuseTokenSource); ok { + if t == nil { + // Just use it directly, but set the expiryDelta to earlyExpiry, + // so the behavior matches what the user expects. + rt.expiryDelta = earlyExpiry + return rt + } + src = rt.new + } + if t != nil { + t.expiryDelta = earlyExpiry + } + return &reuseTokenSource{ + t: t, + new: src, + expiryDelta: earlyExpiry, + } +} diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go new file mode 100644 index 00000000..50593b6d --- /dev/null +++ b/vendor/golang.org/x/oauth2/pkce.go @@ -0,0 +1,68 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package oauth2 + +import ( + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "net/url" +) + +const ( + codeChallengeKey = "code_challenge" + codeChallengeMethodKey = "code_challenge_method" + codeVerifierKey = "code_verifier" +) + +// GenerateVerifier generates a PKCE code verifier with 32 octets of randomness. +// This follows recommendations in RFC 7636. +// +// A fresh verifier should be generated for each authorization. +// S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL +// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange +// (or Config.DeviceAccessToken). +func GenerateVerifier() string { + // "RECOMMENDED that the output of a suitable random number generator be + // used to create a 32-octet sequence. The octet sequence is then + // base64url-encoded to produce a 43-octet URL-safe string to use as the + // code verifier." + // https://datatracker.ietf.org/doc/html/rfc7636#section-4.1 + data := make([]byte, 32) + if _, err := rand.Read(data); err != nil { + panic(err) + } + return base64.RawURLEncoding.EncodeToString(data) +} + +// VerifierOption returns a PKCE code verifier AuthCodeOption. It should be +// passed to Config.Exchange or Config.DeviceAccessToken only. +func VerifierOption(verifier string) AuthCodeOption { + return setParam{k: codeVerifierKey, v: verifier} +} + +// S256ChallengeFromVerifier returns a PKCE code challenge derived from verifier with method S256. +// +// Prefer to use S256ChallengeOption where possible. +func S256ChallengeFromVerifier(verifier string) string { + sha := sha256.Sum256([]byte(verifier)) + return base64.RawURLEncoding.EncodeToString(sha[:]) +} + +// S256ChallengeOption derives a PKCE code challenge derived from verifier with +// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess +// only. +func S256ChallengeOption(verifier string) AuthCodeOption { + return challengeOption{ + challenge_method: "S256", + challenge: S256ChallengeFromVerifier(verifier), + } +} + +type challengeOption struct{ challenge_method, challenge string } + +func (p challengeOption) setValue(m url.Values) { + m.Set(codeChallengeMethodKey, p.challenge_method) + m.Set(codeChallengeKey, p.challenge) +} diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go index 82272034..5bbb3321 100644 --- a/vendor/golang.org/x/oauth2/token.go +++ b/vendor/golang.org/x/oauth2/token.go @@ -16,10 +16,10 @@ import ( "golang.org/x/oauth2/internal" ) -// expiryDelta determines how earlier a token should be considered +// defaultExpiryDelta determines how earlier a token should be considered // expired than its actual expiration time. It is used to avoid late // expirations due to client-server time mismatches. -const expiryDelta = 10 * time.Second +const defaultExpiryDelta = 10 * time.Second // Token represents the credentials used to authorize // the requests to access protected resources on the OAuth 2.0 @@ -52,6 +52,11 @@ type Token struct { // raw optionally contains extra metadata from the server // when updating a token. raw interface{} + + // expiryDelta is used to calculate when a token is considered + // expired, by subtracting from Expiry. If zero, defaultExpiryDelta + // is used. + expiryDelta time.Duration } // Type returns t.TokenType if non-empty, else "Bearer". @@ -127,6 +132,11 @@ func (t *Token) expired() bool { if t.Expiry.IsZero() { return false } + + expiryDelta := defaultExpiryDelta + if t.expiryDelta != 0 { + expiryDelta = t.expiryDelta + } return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow()) } @@ -154,7 +164,7 @@ func tokenFromInternal(t *internal.Token) *Token { // This token is then mapped from *internal.Token into an *oauth2.Token which is returned along // with an error.. func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) { - tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle)) + tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle), c.authStyleCache.Get()) if err != nil { if rErr, ok := err.(*internal.RetrieveError); ok { return nil, (*RetrieveError)(rErr) @@ -165,14 +175,31 @@ func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) } // RetrieveError is the error returned when the token endpoint returns a -// non-2XX HTTP status code. +// non-2XX HTTP status code or populates RFC 6749's 'error' parameter. +// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 type RetrieveError struct { Response *http.Response // Body is the body that was consumed by reading Response.Body. // It may be truncated. Body []byte + // ErrorCode is RFC 6749's 'error' parameter. + ErrorCode string + // ErrorDescription is RFC 6749's 'error_description' parameter. + ErrorDescription string + // ErrorURI is RFC 6749's 'error_uri' parameter. + ErrorURI string } func (r *RetrieveError) Error() string { + if r.ErrorCode != "" { + s := fmt.Sprintf("oauth2: %q", r.ErrorCode) + if r.ErrorDescription != "" { + s += fmt.Sprintf(" %q", r.ErrorDescription) + } + if r.ErrorURI != "" { + s += fmt.Sprintf(" %q", r.ErrorURI) + } + return s + } return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body) } diff --git a/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s b/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s index db9171c2..269e173c 100644 --- a/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s +++ b/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/cpu/cpu_aix.go b/vendor/golang.org/x/sys/cpu/cpu_aix.go index 8aaeef54..9bf0c32e 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_aix.go +++ b/vendor/golang.org/x/sys/cpu/cpu_aix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix -// +build aix package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/vendor/golang.org/x/sys/cpu/cpu_arm64.s index c61f95a0..fcb9a388 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm64.s +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go index ccf542a7..a8acd3e3 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go index 0af2f248..c8ae6ddc 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go index fa7cdb9b..910728fb 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gc -// +build 386 amd64 amd64p32 -// +build gc package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go index 2aff3189..7f194678 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo -// +build gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go index 4bfbda61..9526d2ce 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo -// +build gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c index 6cc73109..3f73a05d 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gccgo -// +build 386 amd64 amd64p32 -// +build gccgo #include #include diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go index 863d415a..99c60fe9 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gccgo -// +build 386 amd64 amd64p32 -// +build gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux.go b/vendor/golang.org/x/sys/cpu/cpu_linux.go index 159a686f..743eb543 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !386 && !amd64 && !amd64p32 && !arm64 -// +build !386,!amd64,!amd64p32,!arm64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go index 6000db4c..4686c1d5 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips64 || mips64le) -// +build linux -// +build mips64 mips64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go index f4992b1a..cd63e733 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x -// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go index 021356d6..197188e6 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64 || ppc64le) -// +build linux -// +build ppc64 ppc64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/vendor/golang.org/x/sys/cpu/cpu_loong64.go index 0f57b05b..55863585 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_loong64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_loong64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build loong64 -// +build loong64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go index f4063c66..fedb00cc 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build mips64 || mips64le -// +build mips64 mips64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go index 07c4e36d..ffb4ec7e 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build mips || mipsle -// +build mips mipsle package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go index d7b4fb4c..e9ecf2a4 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_arm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && arm -// +build !linux,arm package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go index f3cde129..5341e7f8 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && !netbsd && !openbsd && arm64 -// +build !linux,!netbsd,!openbsd,arm64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go index 0dafe964..5f8f2419 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && (mips64 || mips64le) -// +build !linux -// +build mips64 mips64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go index 060d46b6..89608fba 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build !aix && !linux && (ppc64 || ppc64le) -// +build !aix -// +build !linux -// +build ppc64 ppc64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go index dd10eb79..5ab87808 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !linux && riscv64 -// +build !linux,riscv64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go index 4e8acd16..c14f12b1 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ppc64 || ppc64le -// +build ppc64 ppc64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go index ff7da60e..7f0c79c0 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 -// +build riscv64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_s390x.s b/vendor/golang.org/x/sys/cpu/cpu_s390x.s index 96f81e20..1fb4b701 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_s390x.s +++ b/vendor/golang.org/x/sys/cpu/cpu_s390x.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/vendor/golang.org/x/sys/cpu/cpu_wasm.go index 7747d888..384787ea 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_wasm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_wasm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build wasm -// +build wasm package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go index 2dcde828..c29f5e4c 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 || amd64 || amd64p32 -// +build 386 amd64 amd64p32 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.s b/vendor/golang.org/x/sys/cpu/cpu_x86.s index 39acab2f..7d7ba33e 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.s +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (386 || amd64 || amd64p32) && gc -// +build 386 amd64 amd64p32 -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/cpu/endian_big.go b/vendor/golang.org/x/sys/cpu/endian_big.go index 93ce03a3..7fe04b0a 100644 --- a/vendor/golang.org/x/sys/cpu/endian_big.go +++ b/vendor/golang.org/x/sys/cpu/endian_big.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 -// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/endian_little.go b/vendor/golang.org/x/sys/cpu/endian_little.go index 55db853e..48eccc4c 100644 --- a/vendor/golang.org/x/sys/cpu/endian_little.go +++ b/vendor/golang.org/x/sys/cpu/endian_little.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm -// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm package cpu diff --git a/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go b/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go index d87bd6b3..4cd64c70 100644 --- a/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go +++ b/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && arm64 -// +build linux,arm64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go b/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go index b975ea2a..4c9788ea 100644 --- a/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go +++ b/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.21 -// +build go1.21 package cpu diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go index 96134157..1b9ccb09 100644 --- a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go +++ b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go @@ -9,7 +9,6 @@ // gccgo's libgo and thus must not used a CGo method. //go:build aix && gccgo -// +build aix,gccgo package cpu diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go index 904be42f..e8b6cdbe 100644 --- a/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go +++ b/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go @@ -7,7 +7,6 @@ // (See golang.org/issue/32102) //go:build aix && ppc64 && gc -// +build aix,ppc64,gc package cpu diff --git a/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go b/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go index c9b69937..73687de7 100644 --- a/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go +++ b/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build go1.5 -// +build go1.5 package plan9 diff --git a/vendor/golang.org/x/sys/plan9/pwd_plan9.go b/vendor/golang.org/x/sys/plan9/pwd_plan9.go index 98bf56b7..fb945821 100644 --- a/vendor/golang.org/x/sys/plan9/pwd_plan9.go +++ b/vendor/golang.org/x/sys/plan9/pwd_plan9.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.5 -// +build !go1.5 package plan9 diff --git a/vendor/golang.org/x/sys/plan9/race.go b/vendor/golang.org/x/sys/plan9/race.go index 62377d2f..c02d9ed3 100644 --- a/vendor/golang.org/x/sys/plan9/race.go +++ b/vendor/golang.org/x/sys/plan9/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 && race -// +build plan9,race package plan9 diff --git a/vendor/golang.org/x/sys/plan9/race0.go b/vendor/golang.org/x/sys/plan9/race0.go index f8da3087..7b15e15f 100644 --- a/vendor/golang.org/x/sys/plan9/race0.go +++ b/vendor/golang.org/x/sys/plan9/race0.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 && !race -// +build plan9,!race package plan9 diff --git a/vendor/golang.org/x/sys/plan9/str.go b/vendor/golang.org/x/sys/plan9/str.go index 55fa8d02..ba3e8ff8 100644 --- a/vendor/golang.org/x/sys/plan9/str.go +++ b/vendor/golang.org/x/sys/plan9/str.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 -// +build plan9 package plan9 diff --git a/vendor/golang.org/x/sys/plan9/syscall.go b/vendor/golang.org/x/sys/plan9/syscall.go index 67e5b011..d631fd66 100644 --- a/vendor/golang.org/x/sys/plan9/syscall.go +++ b/vendor/golang.org/x/sys/plan9/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build plan9 -// +build plan9 // Package plan9 contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go index 3f40b9bd..f780d5c8 100644 --- a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && 386 -// +build plan9,386 package plan9 diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go index 0e6a96aa..7de61065 100644 --- a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && amd64 -// +build plan9,amd64 package plan9 diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go index 244c501b..ea85780f 100644 --- a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && arm -// +build plan9,arm package plan9 diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go index abc89c10..e7d3df4b 100644 --- a/vendor/golang.org/x/sys/unix/aliases.go +++ b/vendor/golang.org/x/sys/unix/aliases.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos -// +build go1.9 package unix diff --git a/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s b/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s index db9171c2..269e173c 100644 --- a/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s +++ b/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_bsd_386.s b/vendor/golang.org/x/sys/unix/asm_bsd_386.s index e0fcd9b3..a4fcef0e 100644 --- a/vendor/golang.org/x/sys/unix/asm_bsd_386.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_386.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (freebsd || netbsd || openbsd) && gc -// +build freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s index 2b99c349..1e63615c 100644 --- a/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc -// +build darwin dragonfly freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_bsd_arm.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s index d702d4ad..6496c310 100644 --- a/vendor/golang.org/x/sys/unix/asm_bsd_arm.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (freebsd || netbsd || openbsd) && gc -// +build freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s index fe36a739..4fd1f54d 100644 --- a/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc -// +build darwin freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s b/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s index e5b9a848..42f7eb9e 100644 --- a/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc -// +build darwin freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s b/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s index d560019e..f8902667 100644 --- a/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc -// +build darwin freebsd netbsd openbsd -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s index 8fd101d0..3b473487 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_386.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s index 7ed38e43..67e29f31 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s index 8ef1d514..d6ae269c 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_arm.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s index 98ae0276..01e5e253 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && arm64 && gc -// +build linux -// +build arm64 -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_loong64.s b/vendor/golang.org/x/sys/unix/asm_linux_loong64.s index 56535728..2abf12f6 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_loong64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_loong64.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && loong64 && gc -// +build linux -// +build loong64 -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s index 21231d2c..f84bae71 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips64 || mips64le) && gc -// +build linux -// +build mips64 mips64le -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s index 6783b26c..f08f6280 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips || mipsle) && gc -// +build linux -// +build mips mipsle -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s index 19d49893..bdfc024d 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64 || ppc64le) && gc -// +build linux -// +build ppc64 ppc64le -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s index e42eb81d..2e8c9961 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && gc -// +build riscv64 -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s index c46aab33..2c394b11 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && s390x && gc -// +build linux -// +build s390x -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s index 5e7a1169..fab586a2 100644 --- a/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s index f8c5394c..f949ec54 100644 --- a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gc -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s index 3b54e185..2f67ba86 100644 --- a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s +++ b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x && gc -// +build zos -// +build s390x -// +build gc #include "textflag.h" diff --git a/vendor/golang.org/x/sys/unix/cap_freebsd.go b/vendor/golang.org/x/sys/unix/cap_freebsd.go index 0b7c6adb..a0865789 100644 --- a/vendor/golang.org/x/sys/unix/cap_freebsd.go +++ b/vendor/golang.org/x/sys/unix/cap_freebsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd -// +build freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go index 394a3965..6fb7cb77 100644 --- a/vendor/golang.org/x/sys/unix/constants.go +++ b/vendor/golang.org/x/sys/unix/constants.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go index 65a99850..d7851346 100644 --- a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc -// +build aix,ppc // Functions to access/create device major and minor numbers matching the // encoding used by AIX. diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go index 8fc08ad0..623a5e69 100644 --- a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc64 -// +build aix,ppc64 // Functions to access/create device major and minor numbers matching the // encoding used AIX. diff --git a/vendor/golang.org/x/sys/unix/dev_zos.go b/vendor/golang.org/x/sys/unix/dev_zos.go index a388e59a..bb6a64fe 100644 --- a/vendor/golang.org/x/sys/unix/dev_zos.go +++ b/vendor/golang.org/x/sys/unix/dev_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // Functions to access/create device major and minor numbers matching the // encoding used by z/OS. diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go index 2499f977..1ebf1178 100644 --- a/vendor/golang.org/x/sys/unix/dirent.go +++ b/vendor/golang.org/x/sys/unix/dirent.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go index a5202655..1095fd31 100644 --- a/vendor/golang.org/x/sys/unix/endian_big.go +++ b/vendor/golang.org/x/sys/unix/endian_big.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 -// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 package unix diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go index b0f2bc4a..b9f0e277 100644 --- a/vendor/golang.org/x/sys/unix/endian_little.go +++ b/vendor/golang.org/x/sys/unix/endian_little.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh -// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh package unix diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go index 29ccc4d1..a96da71f 100644 --- a/vendor/golang.org/x/sys/unix/env_unix.go +++ b/vendor/golang.org/x/sys/unix/env_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Unix environment variables. diff --git a/vendor/golang.org/x/sys/unix/epoll_zos.go b/vendor/golang.org/x/sys/unix/epoll_zos.go index cedaf7e0..7753fdde 100644 --- a/vendor/golang.org/x/sys/unix/epoll_zos.go +++ b/vendor/golang.org/x/sys/unix/epoll_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/fcntl.go b/vendor/golang.org/x/sys/unix/fcntl.go index e9b99125..6200876f 100644 --- a/vendor/golang.org/x/sys/unix/fcntl.go +++ b/vendor/golang.org/x/sys/unix/fcntl.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build dragonfly || freebsd || linux || netbsd || openbsd -// +build dragonfly freebsd linux netbsd openbsd +//go:build dragonfly || freebsd || linux || netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go index 29d44808..13b4acd5 100644 --- a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go +++ b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) -// +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go index a8068f94..9e83d18c 100644 --- a/vendor/golang.org/x/sys/unix/fdset.go +++ b/vendor/golang.org/x/sys/unix/fdset.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/vendor/golang.org/x/sys/unix/fstatfs_zos.go index e377cc9f..c8bde601 100644 --- a/vendor/golang.org/x/sys/unix/fstatfs_zos.go +++ b/vendor/golang.org/x/sys/unix/fstatfs_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go index b06f52d7..aca5721d 100644 --- a/vendor/golang.org/x/sys/unix/gccgo.go +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo && !aix && !hurd -// +build gccgo,!aix,!hurd package unix diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c index f98a1c54..d468b7b4 100644 --- a/vendor/golang.org/x/sys/unix/gccgo_c.c +++ b/vendor/golang.org/x/sys/unix/gccgo_c.c @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo && !aix && !hurd -// +build gccgo,!aix,!hurd #include #include diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go index e60e49a3..972d61bd 100644 --- a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build gccgo && linux && amd64 -// +build gccgo,linux,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/ifreq_linux.go b/vendor/golang.org/x/sys/unix/ifreq_linux.go index 15721a51..848840ae 100644 --- a/vendor/golang.org/x/sys/unix/ifreq_linux.go +++ b/vendor/golang.org/x/sys/unix/ifreq_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go index 0d12c085..dbe680ea 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_linux.go +++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go @@ -231,3 +231,8 @@ func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) { func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error { return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value)) } + +// IoctlLoopConfigure configures all loop device parameters in a single step +func IoctlLoopConfigure(fd int, value *LoopConfig) error { + return ioctlPtr(fd, LOOP_CONFIGURE, unsafe.Pointer(value)) +} diff --git a/vendor/golang.org/x/sys/unix/ioctl_signed.go b/vendor/golang.org/x/sys/unix/ioctl_signed.go index 7def9580..5b0759bd 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_signed.go +++ b/vendor/golang.org/x/sys/unix/ioctl_signed.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || solaris -// +build aix solaris package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl_unsigned.go b/vendor/golang.org/x/sys/unix/ioctl_unsigned.go index 649913d1..20f470b9 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_unsigned.go +++ b/vendor/golang.org/x/sys/unix/ioctl_unsigned.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd -// +build darwin dragonfly freebsd hurd linux netbsd openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl_zos.go b/vendor/golang.org/x/sys/unix/ioctl_zos.go index cdc21bf7..c8b2a750 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_zos.go +++ b/vendor/golang.org/x/sys/unix/ioctl_zos.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 47fa6a7e..fdcaa974 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -248,6 +248,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -283,10 +284,6 @@ struct ltchars { #include #endif -#ifndef MSG_FASTOPEN -#define MSG_FASTOPEN 0x20000000 -#endif - #ifndef PTRACE_GETREGS #define PTRACE_GETREGS 0xc #endif @@ -295,14 +292,6 @@ struct ltchars { #define PTRACE_SETREGS 0xd #endif -#ifndef SOL_NETLINK -#define SOL_NETLINK 270 -#endif - -#ifndef SOL_SMC -#define SOL_SMC 286 -#endif - #ifdef SOL_BLUETOOTH // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h // but it is already in bluetooth_linux.go @@ -319,10 +308,23 @@ struct ltchars { #undef TIPC_WAIT_FOREVER #define TIPC_WAIT_FOREVER 0xffffffff -// Copied from linux/l2tp.h -// Including linux/l2tp.h here causes conflicts between linux/in.h -// and netinet/in.h included via net/route.h above. -#define IPPROTO_L2TP 115 +// Copied from linux/netfilter/nf_nat.h +// Including linux/netfilter/nf_nat.h here causes conflicts between linux/in.h +// and netinet/in.h. +#define NF_NAT_RANGE_MAP_IPS (1 << 0) +#define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1) +#define NF_NAT_RANGE_PROTO_RANDOM (1 << 2) +#define NF_NAT_RANGE_PERSISTENT (1 << 3) +#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4) +#define NF_NAT_RANGE_PROTO_OFFSET (1 << 5) +#define NF_NAT_RANGE_NETMAP (1 << 6) +#define NF_NAT_RANGE_PROTO_RANDOM_ALL \ + (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) +#define NF_NAT_RANGE_MASK \ + (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ + NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ + NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \ + NF_NAT_RANGE_NETMAP) // Copied from linux/hid.h. // Keep in sync with the size of the referenced fields. @@ -519,6 +521,7 @@ ccflags="$@" $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^LO_(KEY|NAME)_SIZE$/ || $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ || + $2 == "LOOP_CONFIGURE" || $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ || $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || @@ -560,7 +563,7 @@ ccflags="$@" $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ || $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || $2 ~ /^CLONE_[A-Z_]+/ || - $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ && + $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+|BPF_F_LINK)$/ && $2 ~ /^(BPF|DLT)_/ || $2 ~ /^AUDIT_/ || $2 ~ /^(CLOCK|TIMER)_/ || @@ -581,7 +584,7 @@ ccflags="$@" $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || $2 ~ /^KEYCTL_/ || $2 ~ /^PERF_/ || - $2 ~ /^SECCOMP_MODE_/ || + $2 ~ /^SECCOMP_/ || $2 ~ /^SEEK_/ || $2 ~ /^SCHED_/ || $2 ~ /^SPLICE_/ || @@ -602,6 +605,9 @@ ccflags="$@" $2 ~ /^FSOPT_/ || $2 ~ /^WDIO[CFS]_/ || $2 ~ /^NFN/ || + $2 !~ /^NFT_META_IIFTYPE/ && + $2 ~ /^NFT_/ || + $2 ~ /^NF_NAT_/ || $2 ~ /^XDP_/ || $2 ~ /^RWF_/ || $2 ~ /^(HDIO|WIN|SMART)_/ || @@ -663,7 +669,6 @@ echo '// mkerrors.sh' "$@" echo '// Code generated by the command above; see README.md. DO NOT EDIT.' echo echo "//go:build ${GOARCH} && ${GOOS}" -echo "// +build ${GOARCH},${GOOS}" echo go tool cgo -godefs -- "$@" _const.go >_error.out cat _error.out | grep -vf _error.grep | grep -vf _signal.grep diff --git a/vendor/golang.org/x/sys/unix/mmap_nomremap.go b/vendor/golang.org/x/sys/unix/mmap_nomremap.go index ca051363..4b68e597 100644 --- a/vendor/golang.org/x/sys/unix/mmap_nomremap.go +++ b/vendor/golang.org/x/sys/unix/mmap_nomremap.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris -// +build aix darwin dragonfly freebsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go index fa93d0aa..fd45fe52 100644 --- a/vendor/golang.org/x/sys/unix/mremap.go +++ b/vendor/golang.org/x/sys/unix/mremap.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || netbsd -// +build linux netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go index 53f1b4c5..4d0a3430 100644 --- a/vendor/golang.org/x/sys/unix/pagesize_unix.go +++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // For Unix, get the pagesize from the runtime. diff --git a/vendor/golang.org/x/sys/unix/pledge_openbsd.go b/vendor/golang.org/x/sys/unix/pledge_openbsd.go index eb48294b..6a09af53 100644 --- a/vendor/golang.org/x/sys/unix/pledge_openbsd.go +++ b/vendor/golang.org/x/sys/unix/pledge_openbsd.go @@ -8,54 +8,31 @@ import ( "errors" "fmt" "strconv" - "syscall" - "unsafe" ) // Pledge implements the pledge syscall. // -// The pledge syscall does not accept execpromises on OpenBSD releases -// before 6.3. -// -// execpromises must be empty when Pledge is called on OpenBSD -// releases predating 6.3, otherwise an error will be returned. +// This changes both the promises and execpromises; use PledgePromises or +// PledgeExecpromises to only change the promises or execpromises +// respectively. // // For more information see pledge(2). func Pledge(promises, execpromises string) error { - maj, min, err := majmin() - if err != nil { + if err := pledgeAvailable(); err != nil { return err } - err = pledgeAvailable(maj, min, execpromises) + pptr, err := BytePtrFromString(promises) if err != nil { return err } - pptr, err := syscall.BytePtrFromString(promises) + exptr, err := BytePtrFromString(execpromises) if err != nil { return err } - // This variable will hold either a nil unsafe.Pointer or - // an unsafe.Pointer to a string (execpromises). - var expr unsafe.Pointer - - // If we're running on OpenBSD > 6.2, pass execpromises to the syscall. - if maj > 6 || (maj == 6 && min > 2) { - exptr, err := syscall.BytePtrFromString(execpromises) - if err != nil { - return err - } - expr = unsafe.Pointer(exptr) - } - - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0) - if e != 0 { - return e - } - - return nil + return pledge(pptr, exptr) } // PledgePromises implements the pledge syscall. @@ -64,30 +41,16 @@ func Pledge(promises, execpromises string) error { // // For more information see pledge(2). func PledgePromises(promises string) error { - maj, min, err := majmin() - if err != nil { - return err - } - - err = pledgeAvailable(maj, min, "") - if err != nil { + if err := pledgeAvailable(); err != nil { return err } - // This variable holds the execpromises and is always nil. - var expr unsafe.Pointer - - pptr, err := syscall.BytePtrFromString(promises) + pptr, err := BytePtrFromString(promises) if err != nil { return err } - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0) - if e != 0 { - return e - } - - return nil + return pledge(pptr, nil) } // PledgeExecpromises implements the pledge syscall. @@ -96,30 +59,16 @@ func PledgePromises(promises string) error { // // For more information see pledge(2). func PledgeExecpromises(execpromises string) error { - maj, min, err := majmin() - if err != nil { + if err := pledgeAvailable(); err != nil { return err } - err = pledgeAvailable(maj, min, execpromises) + exptr, err := BytePtrFromString(execpromises) if err != nil { return err } - // This variable holds the promises and is always nil. - var pptr unsafe.Pointer - - exptr, err := syscall.BytePtrFromString(execpromises) - if err != nil { - return err - } - - _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0) - if e != 0 { - return e - } - - return nil + return pledge(nil, exptr) } // majmin returns major and minor version number for an OpenBSD system. @@ -147,16 +96,15 @@ func majmin() (major int, minor int, err error) { // pledgeAvailable checks for availability of the pledge(2) syscall // based on the running OpenBSD version. -func pledgeAvailable(maj, min int, execpromises string) error { - // If OpenBSD <= 5.9, pledge is not available. - if (maj == 5 && min != 9) || maj < 5 { - return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min) +func pledgeAvailable() error { + maj, min, err := majmin() + if err != nil { + return err } - // If OpenBSD <= 6.2 and execpromises is not empty, - // return an error - execpromises is not available before 6.3 - if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" { - return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min) + // Require OpenBSD 6.4 as a minimum. + if maj < 6 || (maj == 6 && min <= 3) { + return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj, min) } return nil diff --git a/vendor/golang.org/x/sys/unix/ptrace_darwin.go b/vendor/golang.org/x/sys/unix/ptrace_darwin.go index 463c3eff..3f0975f3 100644 --- a/vendor/golang.org/x/sys/unix/ptrace_darwin.go +++ b/vendor/golang.org/x/sys/unix/ptrace_darwin.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package unix diff --git a/vendor/golang.org/x/sys/unix/ptrace_ios.go b/vendor/golang.org/x/sys/unix/ptrace_ios.go index ed0509a0..a4d35db5 100644 --- a/vendor/golang.org/x/sys/unix/ptrace_ios.go +++ b/vendor/golang.org/x/sys/unix/ptrace_ios.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ios -// +build ios package unix diff --git a/vendor/golang.org/x/sys/unix/race.go b/vendor/golang.org/x/sys/unix/race.go index 6f6c5fec..714d2aae 100644 --- a/vendor/golang.org/x/sys/unix/race.go +++ b/vendor/golang.org/x/sys/unix/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && race) || (linux && race) || (freebsd && race) -// +build darwin,race linux,race freebsd,race package unix diff --git a/vendor/golang.org/x/sys/unix/race0.go b/vendor/golang.org/x/sys/unix/race0.go index 706e1322..4a9f6634 100644 --- a/vendor/golang.org/x/sys/unix/race0.go +++ b/vendor/golang.org/x/sys/unix/race0.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos -// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos package unix diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdents.go b/vendor/golang.org/x/sys/unix/readdirent_getdents.go index 4d625756..dbd2b6cc 100644 --- a/vendor/golang.org/x/sys/unix/readdirent_getdents.go +++ b/vendor/golang.org/x/sys/unix/readdirent_getdents.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd -// +build aix dragonfly freebsd linux netbsd openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go index 2a4ba47c..130398b6 100644 --- a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go +++ b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin -// +build darwin package unix diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go index 3865943f..c3a62dbb 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Socket control messages diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go index 0840fe4a..4a1eab37 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go index 63e8c838..5ea74da9 100644 --- a/vendor/golang.org/x/sys/unix/syscall.go +++ b/vendor/golang.org/x/sys/unix/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos // Package unix contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index e94e6cda..67ce6cef 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix -// +build aix // Aix system calls. // This file is compiled as ordinary Go code, @@ -107,7 +106,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { if n > 0 { sl += _Socklen(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go index f2871fa9..1fdaa476 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc -// +build aix,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go index 75718ec0..c87f9a9f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix && ppc64 -// +build aix,ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 4217de51..a00c3e54 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd // BSD system call wrappers shared by *BSD based systems // including OS X (Darwin) and FreeBSD. Like the other @@ -317,7 +316,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { if err != nil { return "", err } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index b37310ce..0eaecf5f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && darwin -// +build amd64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go index d51ec996..f36c6707 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && darwin -// +build arm64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go index 53c96641..16dc6993 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && go1.12 -// +build darwin,go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go index 4e2d3212..14bab6b2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && dragonfly -// +build amd64,dragonfly package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go index b8da5100..3967bca7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && freebsd -// +build 386,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go index 47155c48..eff19ada 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && freebsd -// +build amd64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go index 08932093..4f24b517 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && freebsd -// +build arm,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go index d151a0d0..ac30759e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && freebsd -// +build arm64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go index d5cd64b3..aab725ca 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && freebsd -// +build riscv64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go index 381fd467..ba46651f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_hurd.go +++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build hurd -// +build hurd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd_386.go b/vendor/golang.org/x/sys/unix/syscall_hurd_386.go index 7cf54a3e..df89f9e6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_hurd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_hurd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && hurd -// +build 386,hurd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go index 87db5a6a..a863f705 100644 --- a/vendor/golang.org/x/sys/unix/syscall_illumos.go +++ b/vendor/golang.org/x/sys/unix/syscall_illumos.go @@ -5,7 +5,6 @@ // illumos system calls not present on Solaris. //go:build amd64 && illumos -// +build amd64,illumos package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index fb4e5022..0f85e29e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -61,15 +61,23 @@ func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) ( } //sys fchmodat(dirfd int, path string, mode uint32) (err error) - -func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { - // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior - // and check the flags. Otherwise the mode would be applied to the symlink - // destination which is not what the user expects. - if flags&^AT_SYMLINK_NOFOLLOW != 0 { - return EINVAL - } else if flags&AT_SYMLINK_NOFOLLOW != 0 { - return EOPNOTSUPP +//sys fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) + +func Fchmodat(dirfd int, path string, mode uint32, flags int) error { + // Linux fchmodat doesn't support the flags parameter, but fchmodat2 does. + // Try fchmodat2 if flags are specified. + if flags != 0 { + err := fchmodat2(dirfd, path, mode, flags) + if err == ENOSYS { + // fchmodat2 isn't available. If the flags are known to be valid, + // return EOPNOTSUPP to indicate that fchmodat doesn't support them. + if flags&^(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 { + return EINVAL + } else if flags&(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 { + return EOPNOTSUPP + } + } + return err } return fchmodat(dirfd, path, mode) } @@ -417,7 +425,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { if n > 0 { sl += _Socklen(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- @@ -1301,7 +1310,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { return "", err } } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) { @@ -2482,3 +2491,5 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { } return attr, nil } + +//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index c7d9945e..506dafa7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && linux -// +build 386,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go b/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go index 08086ac6..38d55641 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) -// +build linux -// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 70601ce3..d557cf8d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && linux -// +build amd64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go index 8b0f0f3a..facdb83b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && linux && gc -// +build amd64,linux,gc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index da298641..cd2dd797 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && linux -// +build arm,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index f5266689..cf2ee6c7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && linux -// +build arm64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go index 2b1168d7..ffc4c2b6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gc -// +build linux,gc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go index 9843fb48..9ebfdcf4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gc && 386 -// +build linux,gc,386 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go index a6008fcc..5f2b57c4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && gc && linux -// +build arm,gc,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go index 7740af24..d1a3ad82 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gccgo && 386 -// +build linux,gccgo,386 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go index e16a1229..f2f67423 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && gccgo && arm -// +build linux,gccgo,arm package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index f6ab02ec..3d0e9845 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build loong64 && linux -// +build loong64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index 93fe59d2..70963a95 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips64 || mips64le) -// +build linux -// +build mips64 mips64le package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index aae7f0ff..c218ebd2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (mips || mipsle) -// +build linux -// +build mips mipsle package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go index 66eff19a..e6c48500 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && ppc -// +build linux,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 806aa257..7286a9aa 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64 || ppc64le) -// +build linux -// +build ppc64 ppc64le package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 5e6ceee1..6f5a2889 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && linux -// +build riscv64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index 2f89e8f5..66f31210 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build s390x && linux -// +build s390x,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index 7ca064ae..11d1f169 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build sparc64 && linux -// +build sparc64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go index 5199d282..7a5eb574 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && netbsd -// +build 386,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go index 70a9c52e..62d8957a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && netbsd -// +build amd64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go index 3eb5942f..ce6a0688 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && netbsd -// +build arm,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go index fc6ccfd8..d46d689d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && netbsd -// +build arm64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 6f34479b..b25343c7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -137,18 +137,13 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { - var _p0 unsafe.Pointer + var bufptr *Statfs_t var bufsize uintptr if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) + bufptr = &buf[0] bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) } - r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = e1 - } - return + return getfsstat(bufptr, bufsize, flags) } //sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) @@ -171,6 +166,20 @@ func Getresgid() (rgid, egid, sgid int) { //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +//sys fcntl(fd int, cmd int, arg int) (n int, err error) +//sys fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) = SYS_FCNTL + +// FcntlInt performs a fcntl syscall on fd with the provided command and argument. +func FcntlInt(fd uintptr, cmd, arg int) (int, error) { + return fcntl(int(fd), cmd, arg) +} + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk)) + return err +} + //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { @@ -326,4 +335,7 @@ func Uname(uname *Utsname) error { //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys munmap(addr uintptr, length uintptr) (err error) +//sys getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) +//sys pledge(promises *byte, execpromises *byte) (err error) +//sys unveil(path *byte, flags *byte) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go index 6baabcdc..9ddc89f4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go index bab25360..70a3c96e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go index 8eed3c4d..265caa87 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go index 483dde99..ac4fda17 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go index 04aa43f4..0a451e6d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build openbsd -// +build openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go index c2796139..30a308cb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go index 23199a7f..ea954330 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index b99cfa13..21974af0 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -128,7 +128,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { if n > 0 { sl += _Socklen(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- @@ -157,7 +158,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { if err != nil { return "", err } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } const ImplementsGetwd = true diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go index 0bd25ef8..e02d8cea 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build amd64 && solaris -// +build amd64,solaris package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index f6eda270..77081de8 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go index b6919ca5..05c95bcc 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc -// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris -// +build gc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go index f6f707ac..23f39b7a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go @@ -3,9 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && (ppc64le || ppc64) && gc -// +build linux -// +build ppc64le ppc64 -// +build gc package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index 4596d041..b473038c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix @@ -1105,7 +1104,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { return "", err } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { diff --git a/vendor/golang.org/x/sys/unix/sysvshm_linux.go b/vendor/golang.org/x/sys/unix/sysvshm_linux.go index 2c3a4437..4fcd38de 100644 --- a/vendor/golang.org/x/sys/unix/sysvshm_linux.go +++ b/vendor/golang.org/x/sys/unix/sysvshm_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux -// +build linux package unix diff --git a/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/vendor/golang.org/x/sys/unix/sysvshm_unix.go index 5bb41d17..79a84f18 100644 --- a/vendor/golang.org/x/sys/unix/sysvshm_unix.go +++ b/vendor/golang.org/x/sys/unix/sysvshm_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin && !ios) || linux -// +build darwin,!ios linux package unix diff --git a/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go index 71bddefd..9eb0db66 100644 --- a/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go +++ b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package unix diff --git a/vendor/golang.org/x/sys/unix/timestruct.go b/vendor/golang.org/x/sys/unix/timestruct.go index 616b1b28..7997b190 100644 --- a/vendor/golang.org/x/sys/unix/timestruct.go +++ b/vendor/golang.org/x/sys/unix/timestruct.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package unix diff --git a/vendor/golang.org/x/sys/unix/unveil_openbsd.go b/vendor/golang.org/x/sys/unix/unveil_openbsd.go index 168d5ae7..cb7e598c 100644 --- a/vendor/golang.org/x/sys/unix/unveil_openbsd.go +++ b/vendor/golang.org/x/sys/unix/unveil_openbsd.go @@ -4,39 +4,48 @@ package unix -import ( - "syscall" - "unsafe" -) +import "fmt" // Unveil implements the unveil syscall. // For more information see unveil(2). // Note that the special case of blocking further // unveil calls is handled by UnveilBlock. func Unveil(path string, flags string) error { - pathPtr, err := syscall.BytePtrFromString(path) - if err != nil { + if err := supportsUnveil(); err != nil { return err } - flagsPtr, err := syscall.BytePtrFromString(flags) + pathPtr, err := BytePtrFromString(path) if err != nil { return err } - _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) - if e != 0 { - return e + flagsPtr, err := BytePtrFromString(flags) + if err != nil { + return err } - return nil + return unveil(pathPtr, flagsPtr) } // UnveilBlock blocks future unveil calls. // For more information see unveil(2). func UnveilBlock() error { - // Both pointers must be nil. - var pathUnsafe, flagsUnsafe unsafe.Pointer - _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) - if e != 0 { - return e + if err := supportsUnveil(); err != nil { + return err } + return unveil(nil, nil) +} + +// supportsUnveil checks for availability of the unveil(2) system call based +// on the running OpenBSD version. +func supportsUnveil() error { + maj, min, err := majmin() + if err != nil { + return err + } + + // unveil is not available before 6.4 + if maj < 6 || (maj == 6 && min <= 3) { + return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min) + } + return nil } diff --git a/vendor/golang.org/x/sys/unix/xattr_bsd.go b/vendor/golang.org/x/sys/unix/xattr_bsd.go index f5f8e9f3..e1687939 100644 --- a/vendor/golang.org/x/sys/unix/xattr_bsd.go +++ b/vendor/golang.org/x/sys/unix/xattr_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build freebsd || netbsd -// +build freebsd netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go index ca9799b7..2fb219d7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && aix -// +build ppc,aix // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -maix32 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go index 200c8c26..b0e6f5c8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && aix -// +build ppc64,aix // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -maix64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index 14300762..e40fa852 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin -// +build amd64,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index ab044a74..bb02aa6c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin -// +build arm64,darwin // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go index 17bba0e4..c0e0f869 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly -// +build amd64,dragonfly // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go index f8c2c513..6c692390 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd -// +build 386,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go index 96310c3b..dd9163f8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd -// +build amd64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go index 777b69de..493a2a79 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd -// +build arm,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go index c557ac2d..8b437b30 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd -// +build arm64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go index 341b4d96..67c02dd5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd -// +build riscv64,freebsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index f9c7f479..36bf8399 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -1,7 +1,6 @@ // Code generated by mkmerge; DO NOT EDIT. //go:build linux -// +build linux package unix @@ -481,10 +480,13 @@ const ( BPF_FROM_BE = 0x8 BPF_FROM_LE = 0x0 BPF_FS_MAGIC = 0xcafe4a11 + BPF_F_AFTER = 0x10 BPF_F_ALLOW_MULTI = 0x2 BPF_F_ALLOW_OVERRIDE = 0x1 BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_KPROBE_MULTI_RETURN = 0x1 + BPF_F_BEFORE = 0x8 + BPF_F_ID = 0x20 + BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 @@ -521,6 +523,7 @@ const ( BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 BPF_MEM = 0x60 + BPF_MEMSX = 0x80 BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 @@ -776,6 +779,8 @@ const ( DEVLINK_GENL_MCGRP_CONFIG_NAME = "config" DEVLINK_GENL_NAME = "devlink" DEVLINK_GENL_VERSION = 0x1 + DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO = 0x4 + DEVLINK_PORT_FN_CAP_IPSEC_PACKET = 0x8 DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2 DEVLINK_PORT_FN_CAP_ROCE = 0x1 DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 @@ -1698,6 +1703,7 @@ const ( KEXEC_ON_CRASH = 0x1 KEXEC_PRESERVE_CONTEXT = 0x2 KEXEC_SEGMENT_MAX = 0x10 + KEXEC_UPDATE_ELFCOREHDR = 0x4 KEYCTL_ASSUME_AUTHORITY = 0x10 KEYCTL_CAPABILITIES = 0x1f KEYCTL_CAPS0_BIG_KEY = 0x10 @@ -1779,6 +1785,8 @@ const ( LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20 LANDLOCK_ACCESS_FS_TRUNCATE = 0x4000 LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2 + LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 + LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef @@ -1795,6 +1803,7 @@ const ( LOCK_SH = 0x1 LOCK_UN = 0x8 LOOP_CLR_FD = 0x4c01 + LOOP_CONFIGURE = 0x4c0a LOOP_CTL_ADD = 0x4c80 LOOP_CTL_GET_FREE = 0x4c82 LOOP_CTL_REMOVE = 0x4c81 @@ -2120,6 +2129,60 @@ const ( NFNL_SUBSYS_QUEUE = 0x3 NFNL_SUBSYS_ULOG = 0x4 NFS_SUPER_MAGIC = 0x6969 + NFT_CHAIN_FLAGS = 0x7 + NFT_CHAIN_MAXNAMELEN = 0x100 + NFT_CT_MAX = 0x17 + NFT_DATA_RESERVED_MASK = 0xffffff00 + NFT_DATA_VALUE_MAXLEN = 0x40 + NFT_EXTHDR_OP_MAX = 0x4 + NFT_FIB_RESULT_MAX = 0x3 + NFT_INNER_MASK = 0xf + NFT_LOGLEVEL_MAX = 0x8 + NFT_NAME_MAXLEN = 0x100 + NFT_NG_MAX = 0x1 + NFT_OBJECT_CONNLIMIT = 0x5 + NFT_OBJECT_COUNTER = 0x1 + NFT_OBJECT_CT_EXPECT = 0x9 + NFT_OBJECT_CT_HELPER = 0x3 + NFT_OBJECT_CT_TIMEOUT = 0x7 + NFT_OBJECT_LIMIT = 0x4 + NFT_OBJECT_MAX = 0xa + NFT_OBJECT_QUOTA = 0x2 + NFT_OBJECT_SECMARK = 0x8 + NFT_OBJECT_SYNPROXY = 0xa + NFT_OBJECT_TUNNEL = 0x6 + NFT_OBJECT_UNSPEC = 0x0 + NFT_OBJ_MAXNAMELEN = 0x100 + NFT_OSF_MAXGENRELEN = 0x10 + NFT_QUEUE_FLAG_BYPASS = 0x1 + NFT_QUEUE_FLAG_CPU_FANOUT = 0x2 + NFT_QUEUE_FLAG_MASK = 0x3 + NFT_REG32_COUNT = 0x10 + NFT_REG32_SIZE = 0x4 + NFT_REG_MAX = 0x4 + NFT_REG_SIZE = 0x10 + NFT_REJECT_ICMPX_MAX = 0x3 + NFT_RT_MAX = 0x4 + NFT_SECMARK_CTX_MAXLEN = 0x100 + NFT_SET_MAXNAMELEN = 0x100 + NFT_SOCKET_MAX = 0x3 + NFT_TABLE_F_MASK = 0x3 + NFT_TABLE_MAXNAMELEN = 0x100 + NFT_TRACETYPE_MAX = 0x3 + NFT_TUNNEL_F_MASK = 0x7 + NFT_TUNNEL_MAX = 0x1 + NFT_TUNNEL_MODE_MAX = 0x2 + NFT_USERDATA_MAXLEN = 0x100 + NFT_XFRM_KEY_MAX = 0x6 + NF_NAT_RANGE_MAP_IPS = 0x1 + NF_NAT_RANGE_MASK = 0x7f + NF_NAT_RANGE_NETMAP = 0x40 + NF_NAT_RANGE_PERSISTENT = 0x8 + NF_NAT_RANGE_PROTO_OFFSET = 0x20 + NF_NAT_RANGE_PROTO_RANDOM = 0x4 + NF_NAT_RANGE_PROTO_RANDOM_ALL = 0x14 + NF_NAT_RANGE_PROTO_RANDOM_FULLY = 0x10 + NF_NAT_RANGE_PROTO_SPECIFIED = 0x2 NILFS_SUPER_MAGIC = 0x3434 NL0 = 0x0 NL1 = 0x100 @@ -2275,6 +2338,7 @@ const ( PERF_MEM_LVLNUM_PMEM = 0xe PERF_MEM_LVLNUM_RAM = 0xd PERF_MEM_LVLNUM_SHIFT = 0x21 + PERF_MEM_LVLNUM_UNC = 0x8 PERF_MEM_LVL_HIT = 0x2 PERF_MEM_LVL_IO = 0x1000 PERF_MEM_LVL_L1 = 0x8 @@ -2403,6 +2467,7 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 + PR_MDWE_NO_INHERIT = 0x2 PR_MDWE_REFUSE_EXEC_GAIN = 0x1 PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_ENABLE_MANAGEMENT = 0x2b @@ -2607,8 +2672,9 @@ const ( RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_MASK = 0x1f RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TCP_USEC_TS = 0x10 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb @@ -2851,9 +2917,38 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 + SECCOMP_ADDFD_FLAG_SEND = 0x2 + SECCOMP_ADDFD_FLAG_SETFD = 0x1 + SECCOMP_FILTER_FLAG_LOG = 0x2 + SECCOMP_FILTER_FLAG_NEW_LISTENER = 0x8 + SECCOMP_FILTER_FLAG_SPEC_ALLOW = 0x4 + SECCOMP_FILTER_FLAG_TSYNC = 0x1 + SECCOMP_FILTER_FLAG_TSYNC_ESRCH = 0x10 + SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV = 0x20 + SECCOMP_GET_ACTION_AVAIL = 0x2 + SECCOMP_GET_NOTIF_SIZES = 0x3 + SECCOMP_IOCTL_NOTIF_RECV = 0xc0502100 + SECCOMP_IOCTL_NOTIF_SEND = 0xc0182101 + SECCOMP_IOC_MAGIC = '!' SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 + SECCOMP_RET_ACTION = 0x7fff0000 + SECCOMP_RET_ACTION_FULL = 0xffff0000 + SECCOMP_RET_ALLOW = 0x7fff0000 + SECCOMP_RET_DATA = 0xffff + SECCOMP_RET_ERRNO = 0x50000 + SECCOMP_RET_KILL = 0x0 + SECCOMP_RET_KILL_PROCESS = 0x80000000 + SECCOMP_RET_KILL_THREAD = 0x0 + SECCOMP_RET_LOG = 0x7ffc0000 + SECCOMP_RET_TRACE = 0x7ff00000 + SECCOMP_RET_TRAP = 0x30000 + SECCOMP_RET_USER_NOTIF = 0x7fc00000 + SECCOMP_SET_MODE_FILTER = 0x1 + SECCOMP_SET_MODE_STRICT = 0x0 + SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP = 0x1 + SECCOMP_USER_NOTIF_FLAG_CONTINUE = 0x1 SECRETMEM_MAGIC = 0x5345434d SECURITYFS_MAGIC = 0x73636673 SEEK_CUR = 0x1 @@ -3013,6 +3108,7 @@ const ( SOL_TIPC = 0x10f SOL_TLS = 0x11a SOL_UDP = 0x11 + SOL_VSOCK = 0x11f SOL_X25 = 0x106 SOL_XDP = 0x11b SOMAXCONN = 0x1000 @@ -3461,6 +3557,7 @@ const ( XDP_PACKET_HEADROOM = 0x100 XDP_PGOFF_RX_RING = 0x0 XDP_PGOFF_TX_RING = 0x80000000 + XDP_PKT_CONTD = 0x1 XDP_RING_NEED_WAKEUP = 0x1 XDP_RX_RING = 0x2 XDP_SHARED_UMEM = 0x1 @@ -3473,6 +3570,7 @@ const ( XDP_UMEM_REG = 0x4 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 + XDP_USE_SG = 0x10 XDP_ZEROCOPY = 0x4 XENFS_SUPER_MAGIC = 0xabba1974 XFS_SUPER_MAGIC = 0x58465342 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 30aee00a..42ff8c3c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux -// +build 386,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go @@ -282,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 8ebfa512..dca43600 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux -// +build amd64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go @@ -283,6 +282,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 271a21cd..5cca668a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux -// +build arm,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go @@ -289,6 +288,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 910c330a..d8cae6d1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux -// +build arm64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go @@ -279,6 +278,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index a640798c..28e39afd 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux -// +build loong64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go @@ -119,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 LASX_CTX_MAGIC = 0x41535801 + LBT_CTX_MAGIC = 0x42540001 LSX_CTX_MAGIC = 0x53580001 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 @@ -275,6 +275,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 0d5925d3..cd66e92c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux -// +build mips,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go @@ -282,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index d72a00e0..c1595eba 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux -// +build mips64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go @@ -282,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 02ba129f..ee9456b0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux -// +build mips64le,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go @@ -282,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 8daa6dd9..8cfca81e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux -// +build mipsle,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go @@ -282,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 63c8fa2f..60b0deb3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux -// +build ppc,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go @@ -337,6 +336,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 930799ec..f90aa728 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux -// +build ppc64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go @@ -341,6 +340,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 8605a7dd..ba9e0150 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux -// +build ppc64le,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go @@ -341,6 +340,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 95a016f1..07cdfd6e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux -// +build riscv64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go @@ -228,6 +227,9 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETFDPIC = 0x21 + PTRACE_GETFDPIC_EXEC = 0x0 + PTRACE_GETFDPIC_INTERP = 0x1 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 @@ -270,6 +272,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 1ae0108f..2f1dd214 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux -// +build s390x,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go @@ -345,6 +344,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 1bb7c633..f40519d9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux -// +build sparc64,linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go @@ -336,6 +335,9 @@ const ( SCM_TIMESTAMPNS = 0x21 SCM_TXTIME = 0x3f SCM_WIFI_STATUS = 0x25 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x400000 SFD_NONBLOCK = 0x4000 SF_FP = 0x38 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go index 72f7420d..130085df 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd -// +build 386,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go index 8d4eb0c0..84769a1a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd -// +build amd64,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go index 9eef9749..602ded00 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd -// +build arm,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -marm _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go index 3b62ba19..efc0406e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && netbsd -// +build arm64,netbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go index af20e474..5a6500f8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go index 6015fcb2..a5aeeb97 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go index 8d44955e..0e9748a7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go index ae16fe75..4f4449ab 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go index 03d90fe3..76a363f0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go index 8e2c51b1..43ca0cdf 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go index 13d40303..b1b8bb20 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go index 1afee6a0..d2ddd317 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && solaris -// +build amd64,solaris // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go index fc7d0506..4dfd2e05 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // Hand edited based on zerrors_linux_s390x.go // TODO: auto-generate. diff --git a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go index 97f20ca2..586317c7 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. //go:build linux && (arm || arm64) -// +build linux -// +build arm arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go index 0b5f7943..d7c881be 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT. //go:build linux && (mips || mips64) -// +build linux -// +build mips mips64 package unix diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go index 2807f7e6..2d2de5d2 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT. //go:build linux && (mipsle || mips64le) -// +build linux -// +build mipsle mips64le package unix diff --git a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go index 281ea64e..5adc79fb 100644 --- a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go @@ -1,8 +1,6 @@ // Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT. //go:build linux && (386 || amd64) -// +build linux -// +build 386 amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go index d1d1d233..6ea64a3c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc -// +build aix,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go index f99a18ad..99ee4399 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 -// +build aix,ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go index c4d50ae5..b68a7836 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 && gc -// +build aix,ppc64,gc package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go index 6903d3b0..0a87450b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 && gccgo -// +build aix,ppc64,gccgo package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index 1cad561e..ccb02f24 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && amd64 -// +build darwin,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index b18edbd0..1b40b997 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && arm64 -// +build darwin,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 0c67df64..aad65fc7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build dragonfly && amd64 -// +build dragonfly,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index e6e05d14..c0096391 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && 386 -// +build freebsd,386 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 7508acca..7664df74 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && amd64 -// +build freebsd,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index 7b56aead..ae099182 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && arm -// +build freebsd,arm package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index cc623dca..11fd5d45 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && arm64 -// +build freebsd,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go index 58184919..c3d2d653 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && riscv64 -// +build freebsd,riscv64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go index 6be25cd1..c698cbc0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build illumos && amd64 -// +build illumos,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 1ff3aec7..1488d271 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1,7 +1,6 @@ // Code generated by mkmerge; DO NOT EDIT. //go:build linux -// +build linux package unix @@ -38,6 +37,21 @@ func fchmodat(dirfd int, path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { @@ -2195,3 +2209,13 @@ func schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) { + _, _, e1 := Syscall6(SYS_CACHESTAT, uintptr(fd), uintptr(unsafe.Pointer(crange)), uintptr(unsafe.Pointer(cstat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 07b549cc..4def3e9f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && 386 -// +build linux,386 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 5f481bf8..fef2bc8b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && amd64 -// +build linux,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index 824cd52c..a9fd76a8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && arm -// +build linux,arm package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index e77aecfe..46006502 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && arm64 -// +build linux,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go index 806ffd1e..c8987d26 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && loong64 -// +build linux,loong64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 961a3afb..921f4306 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips -// +build linux,mips package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index ed05005e..44f06782 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64 -// +build linux,mips64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index d365b718..e7fa0abf 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64le -// +build linux,mips64le package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index c3f1b8bb..8c512567 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mipsle -// +build linux,mipsle package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go index a6574cf9..7392fd45 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc -// +build linux,ppc package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index f4099026..41180434 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64 -// +build linux,ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 9dfcc299..40c6ce7a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64le -// +build linux,ppc64le package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index 0ab4f2ed..2cfe34ad 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && riscv64 -// +build linux,riscv64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 6cde3223..61e6f070 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && s390x -// +build linux,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index 5253d65b..834b8420 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && sparc64 -// +build linux,sparc64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 2df3c5ba..e91ebc14 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && 386 -// +build netbsd,386 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index a60556ba..be28babb 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && amd64 -// +build netbsd,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 9f788917..fb587e82 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && arm -// +build netbsd,arm package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index 82a4cb2d..d576438b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && arm64 -// +build netbsd,arm64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 66b3b645..9dc42410 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && 386 -// +build openbsd,386 package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 3dcacd30..41b56173 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4 +DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 @@ -668,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4 +DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4 +DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4 +DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index c5c4cc11..0d3a0751 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && amd64 -// +build openbsd,amd64 package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 2763620b..4019a656 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 @@ -668,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 93bfbb32..c39f7776 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && arm -// +build openbsd,arm package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index c9223140..ac4af24f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4 +DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 @@ -668,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4 +DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4 +DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4 +DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index a107b8fd..57571d07 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && arm64 -// +build openbsd,arm64 package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index a6bc32c9..f77d5321 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 @@ -668,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index c427de50..e62963e6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && mips64 -// +build openbsd,mips64 package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index b4e7bcea..fae140b6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 @@ -668,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 60c1a99a..00831354 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && ppc64 -// +build openbsd,ppc64 package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index ca3f7660..9d1e0ff0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -213,6 +213,12 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_fcntl(SB) + RET +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_ppoll(SB) RET @@ -801,8 +807,26 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_getfsstat(SB) + RET +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_utimensat(SB) RET GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_pledge(SB) + RET +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_unveil(SB) + RET +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 52eba360..79029ed5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && riscv64 -// +build openbsd,riscv64 package unix @@ -585,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -2213,6 +2238,21 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_getfsstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -2229,3 +2269,31 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pledge(promises *byte, execpromises *byte) (err error) { + _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pledge_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pledge pledge "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unveil(path *byte, flags *byte) (err error) { + _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_unveil_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unveil unveil "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index 477a7d5b..da115f9a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 @@ -668,7 +673,22 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getfsstat(SB) +GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) + TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) + +TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pledge(SB) +GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) + +TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unveil(SB) +GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index b4018946..829b87fe 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build solaris && amd64 -// +build solaris,amd64 package unix diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go index 1d8fe1d4..94f01123 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go index 55e04847..3a58ae81 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go index d2243cf8..dcb7a0eb 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go index 82dc51bd..db5a7bf1 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go index cbdda1a4..7be575a7 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go index f55eae1a..d6e3174c 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go index e4405447..ee97157d 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go index a0db82fc..35c3b91d 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go index f8298ff9..5edda768 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin -// +build amd64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go index 5eb433bb..0dc9e8b4 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin -// +build arm64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go index 703675c0..308ddf3a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly -// +build amd64,dragonfly package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go index 4e0d9610..418664e3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd -// +build 386,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go index 01636b83..34d0b86d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd -// +build amd64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go index ad99bc10..b71cf45e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd -// +build arm,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go index 89dcc427..e32df1c1 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd -// +build arm64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go index ee37aaa0..15ad6111 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd -// +build riscv64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index 9862853d..0cc3ce49 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux -// +build 386,linux package unix @@ -448,4 +447,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 8901f0f4..856d92d6 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux -// +build amd64,linux package unix @@ -370,4 +369,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 6902c37e..8d467094 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux -// +build arm,linux package unix @@ -412,4 +411,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index a6d3dff8..edc17324 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux -// +build arm64,linux package unix @@ -315,4 +314,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index b18f3f71..445eba20 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux -// +build loong64,linux package unix @@ -309,4 +308,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 0302e5e3..adba01bc 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux -// +build mips,linux package unix @@ -432,4 +431,9 @@ const ( SYS_FUTEX_WAITV = 4449 SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 + SYS_FCHMODAT2 = 4452 + SYS_MAP_SHADOW_STACK = 4453 + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 6693ba4a..014c4e9c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux -// +build mips64,linux package unix @@ -362,4 +361,9 @@ const ( SYS_FUTEX_WAITV = 5449 SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 + SYS_FCHMODAT2 = 5452 + SYS_MAP_SHADOW_STACK = 5453 + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index fd93f498..ccc97d74 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux -// +build mips64le,linux package unix @@ -362,4 +361,9 @@ const ( SYS_FUTEX_WAITV = 5449 SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 + SYS_FCHMODAT2 = 5452 + SYS_MAP_SHADOW_STACK = 5453 + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 760ddcad..ec2b64a9 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux -// +build mipsle,linux package unix @@ -432,4 +431,9 @@ const ( SYS_FUTEX_WAITV = 4449 SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 + SYS_FCHMODAT2 = 4452 + SYS_MAP_SHADOW_STACK = 4453 + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index cff2b255..21a839e3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux -// +build ppc,linux package unix @@ -439,4 +438,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index a4b2405d..c11121ec 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux -// +build ppc64,linux package unix @@ -411,4 +410,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index aca54b4e..909b631f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux -// +build ppc64le,linux package unix @@ -411,4 +410,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 9d1738d6..e49bed16 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux -// +build riscv64,linux package unix @@ -316,4 +315,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 022878dc..66017d2d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux -// +build s390x,linux package unix @@ -377,4 +376,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 4100a761..47bab18d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux -// +build sparc64,linux package unix @@ -390,4 +389,9 @@ const ( SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 + SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go index 3a6699eb..b2aa8cd4 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd -// +build 386,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go index 5677cd4f..524a1b1c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd -// +build amd64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go index e784cb6d..d59b943a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd -// +build arm,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go index bd4952ef..31e771d5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; DO NOT EDIT. //go:build arm64 && netbsd -// +build arm64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go index 59773381..9fd77c6c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go index 16af2918..af10af28 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go index f59b18a9..cc2028af 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go index 721ef591..c06dd441 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go index 01c43a01..9ddbf3e0 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go index f258cfa2..19a6ee41 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go index 07919e0e..05192a78 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go index 073daad4..b2e30858 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go index 7a8161c1..3e6d57ca 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && aix -// +build ppc,aix package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go index 07ed733c..3a219bdc 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && aix -// +build ppc64,aix package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 690cefc3..091d107f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin -// +build amd64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 5bffc10e..28ff4ef7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin -// +build arm64,darwin package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go index d0ba8e9b..30e405bb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly -// +build amd64,dragonfly package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 29dc4833..6cbd094a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd -// +build 386,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 0a89b289..7c03b6ee 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd -// +build amd64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index c8666bb1..422107ee 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd -// +build arm,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 88fb48a8..505a12ac 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd -// +build arm64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go index 698dc975..cc986c79 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd -// +build riscv64,freebsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 18aa70b4..dc0c955e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -1,7 +1,6 @@ // Code generated by mkmerge; DO NOT EDIT. //go:build linux -// +build linux package unix @@ -175,7 +174,8 @@ type FscryptPolicyV2 struct { Contents_encryption_mode uint8 Filenames_encryption_mode uint8 Flags uint8 - _ [4]uint8 + Log2_data_unit_size uint8 + _ [3]uint8 Master_key_identifier [16]uint8 } @@ -456,60 +456,63 @@ type Ucred struct { } type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 - Pacing_rate uint64 - Max_pacing_rate uint64 - Bytes_acked uint64 - Bytes_received uint64 - Segs_out uint32 - Segs_in uint32 - Notsent_bytes uint32 - Min_rtt uint32 - Data_segs_in uint32 - Data_segs_out uint32 - Delivery_rate uint64 - Busy_time uint64 - Rwnd_limited uint64 - Sndbuf_limited uint64 - Delivered uint32 - Delivered_ce uint32 - Bytes_sent uint64 - Bytes_retrans uint64 - Dsack_dups uint32 - Reord_seen uint32 - Rcv_ooopack uint32 - Snd_wnd uint32 - Rcv_wnd uint32 - Rehash uint32 + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 + Pacing_rate uint64 + Max_pacing_rate uint64 + Bytes_acked uint64 + Bytes_received uint64 + Segs_out uint32 + Segs_in uint32 + Notsent_bytes uint32 + Min_rtt uint32 + Data_segs_in uint32 + Data_segs_out uint32 + Delivery_rate uint64 + Busy_time uint64 + Rwnd_limited uint64 + Sndbuf_limited uint64 + Delivered uint32 + Delivered_ce uint32 + Bytes_sent uint64 + Bytes_retrans uint64 + Dsack_dups uint32 + Reord_seen uint32 + Rcv_ooopack uint32 + Snd_wnd uint32 + Rcv_wnd uint32 + Rehash uint32 + Total_rto uint16 + Total_rto_recoveries uint16 + Total_rto_time uint32 } type CanFilter struct { @@ -552,7 +555,7 @@ const ( SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc - SizeofTCPInfo = 0xf0 + SizeofTCPInfo = 0xf8 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) @@ -2672,6 +2675,7 @@ const ( BPF_PROG_TYPE_LSM = 0x1d BPF_PROG_TYPE_SK_LOOKUP = 0x1e BPF_PROG_TYPE_SYSCALL = 0x1f + BPF_PROG_TYPE_NETFILTER = 0x20 BPF_CGROUP_INET_INGRESS = 0x0 BPF_CGROUP_INET_EGRESS = 0x1 BPF_CGROUP_INET_SOCK_CREATE = 0x2 @@ -2716,6 +2720,11 @@ const ( BPF_PERF_EVENT = 0x29 BPF_TRACE_KPROBE_MULTI = 0x2a BPF_LSM_CGROUP = 0x2b + BPF_STRUCT_OPS = 0x2c + BPF_NETFILTER = 0x2d + BPF_TCX_INGRESS = 0x2e + BPF_TCX_EGRESS = 0x2f + BPF_TRACE_UPROBE_MULTI = 0x30 BPF_LINK_TYPE_UNSPEC = 0x0 BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1 BPF_LINK_TYPE_TRACING = 0x2 @@ -2726,6 +2735,18 @@ const ( BPF_LINK_TYPE_PERF_EVENT = 0x7 BPF_LINK_TYPE_KPROBE_MULTI = 0x8 BPF_LINK_TYPE_STRUCT_OPS = 0x9 + BPF_LINK_TYPE_NETFILTER = 0xa + BPF_LINK_TYPE_TCX = 0xb + BPF_LINK_TYPE_UPROBE_MULTI = 0xc + BPF_PERF_EVENT_UNSPEC = 0x0 + BPF_PERF_EVENT_UPROBE = 0x1 + BPF_PERF_EVENT_URETPROBE = 0x2 + BPF_PERF_EVENT_KPROBE = 0x3 + BPF_PERF_EVENT_KRETPROBE = 0x4 + BPF_PERF_EVENT_TRACEPOINT = 0x5 + BPF_PERF_EVENT_EVENT = 0x6 + BPF_F_KPROBE_MULTI_RETURN = 0x1 + BPF_F_UPROBE_MULTI_RETURN = 0x1 BPF_ANY = 0x0 BPF_NOEXIST = 0x1 BPF_EXIST = 0x2 @@ -2743,6 +2764,8 @@ const ( BPF_F_MMAPABLE = 0x400 BPF_F_PRESERVE_ELEMS = 0x800 BPF_F_INNER_MAP = 0x1000 + BPF_F_LINK = 0x2000 + BPF_F_PATH_FD = 0x4000 BPF_STATS_RUN_TIME = 0x0 BPF_STACK_BUILD_ID_EMPTY = 0x0 BPF_STACK_BUILD_ID_VALID = 0x1 @@ -2763,6 +2786,7 @@ const ( BPF_F_ZERO_CSUM_TX = 0x2 BPF_F_DONT_FRAGMENT = 0x4 BPF_F_SEQ_NUMBER = 0x8 + BPF_F_NO_TUNNEL_KEY = 0x10 BPF_F_TUNINFO_FLAGS = 0x10 BPF_F_INDEX_MASK = 0xffffffff BPF_F_CURRENT_CPU = 0xffffffff @@ -2779,6 +2803,8 @@ const ( BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = 0x40 + BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = 0x80 + BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = 0x100 BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 BPF_F_SYSCTL_BASE_NAME = 0x1 @@ -2867,6 +2893,8 @@ const ( BPF_DEVCG_DEV_CHAR = 0x2 BPF_FIB_LOOKUP_DIRECT = 0x1 BPF_FIB_LOOKUP_OUTPUT = 0x2 + BPF_FIB_LOOKUP_SKIP_NEIGH = 0x4 + BPF_FIB_LOOKUP_TBID = 0x8 BPF_FIB_LKUP_RET_SUCCESS = 0x0 BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 @@ -2902,6 +2930,7 @@ const ( BPF_CORE_ENUMVAL_EXISTS = 0xa BPF_CORE_ENUMVAL_VALUE = 0xb BPF_CORE_TYPE_MATCHES = 0xc + BPF_F_TIMER_ABS = 0x1 ) const ( @@ -2980,6 +3009,12 @@ type LoopInfo64 struct { Encrypt_key [32]uint8 Init [2]uint64 } +type LoopConfig struct { + Fd uint32 + Size uint32 + Info LoopInfo64 + _ [8]uint64 +} type TIPCSocketAddr struct { Ref uint32 @@ -3368,7 +3403,7 @@ const ( DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 - DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x4 + DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 ) type FsverityDigest struct { @@ -4152,7 +4187,8 @@ const ( ) type LandlockRulesetAttr struct { - Access_fs uint64 + Access_fs uint64 + Access_net uint64 } type LandlockPathBeneathAttr struct { @@ -5103,7 +5139,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x1b + NL80211_FREQUENCY_ATTR_MAX = 0x1c NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5516,7 +5552,7 @@ const ( NL80211_REGDOM_TYPE_CUSTOM_WORLD = 0x2 NL80211_REGDOM_TYPE_INTERSECTION = 0x3 NL80211_REGDOM_TYPE_WORLD = 0x1 - NL80211_REG_RULE_ATTR_MAX = 0x7 + NL80211_REG_RULE_ATTR_MAX = 0x8 NL80211_REKEY_DATA_AKM = 0x4 NL80211_REKEY_DATA_KCK = 0x2 NL80211_REKEY_DATA_KEK = 0x1 @@ -5883,3 +5919,15 @@ type SchedAttr struct { } const SizeofSchedAttr = 0x38 + +type Cachestat_t struct { + Cache uint64 + Dirty uint64 + Writeback uint64 + Evicted uint64 + Recently_evicted uint64 +} +type CachestatRange struct { + Off uint64 + Len uint64 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 6d8acbcc..438a30af 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux -// +build 386,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 59293c68..adceca35 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux -// +build amd64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 40cfa38c..eeaa00a3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux -// +build arm,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 055bc421..6739aa91 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux -// +build arm64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go index f28affbc..9920ef63 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux -// +build loong64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 9d71e7cc..2923b799 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux -// +build mips,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index fd5ccd33..ce2750ee 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux -// +build mips64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 7704de77..3038811d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux -// +build mips64le,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index df00b875..efc6fed1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux -// +build mipsle,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go index 0942840d..9a654b75 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux -// +build ppc,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 03487439..40d358e3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux -// +build ppc64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index bad06704..148c6ceb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux -// +build ppc64le,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 1b4c97c3..72ba8154 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux -// +build riscv64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index aa268d02..71e76550 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux -// +build s390x,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index 444045b6..4abbdb9d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux -// +build sparc64,linux package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index 9bc4c8f9..f22e7947 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd -// +build 386,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index bb05f655..066a7d83 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd -// +build amd64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index db40e3a1..439548ec 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd -// +build arm,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go index 11121151..16085d3b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && netbsd -// +build arm64,netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index 26eba23b..afd13a3a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd -// +build 386,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index 5a547988..5d97f1f9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd -// +build amd64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index be58c4e1..34871cdc 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd -// +build arm,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go index 52338266..5911bceb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd -// +build arm64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go index 605cfdb1..e4f24f3b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd -// +build mips64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go index d6724c01..ca50a793 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd -// +build ppc64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go index ddfd27a4..d7d7f790 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd -// +build riscv64,openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go index 0400747c..14160576 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -2,7 +2,6 @@ // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && solaris -// +build amd64,solaris package unix diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go index aec1efcb..54f31be6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build zos && s390x -// +build zos,s390x // Hand edited based on ztypes_linux_s390x.go // TODO: auto-generate. diff --git a/vendor/golang.org/x/sys/windows/aliases.go b/vendor/golang.org/x/sys/windows/aliases.go index a20ebea6..ce2d713d 100644 --- a/vendor/golang.org/x/sys/windows/aliases.go +++ b/vendor/golang.org/x/sys/windows/aliases.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && go1.9 -// +build windows,go1.9 package windows diff --git a/vendor/golang.org/x/sys/windows/empty.s b/vendor/golang.org/x/sys/windows/empty.s index fdbbbcd3..ba64caca 100644 --- a/vendor/golang.org/x/sys/windows/empty.s +++ b/vendor/golang.org/x/sys/windows/empty.s @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !go1.12 -// +build !go1.12 // This file is here to allow bodyless functions with go:linkname for Go 1.11 // and earlier (see https://golang.org/issue/23311). diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go index b8ad1925..d4577a42 100644 --- a/vendor/golang.org/x/sys/windows/env_windows.go +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -37,14 +37,17 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) { return nil, err } defer DestroyEnvironmentBlock(block) - blockp := unsafe.Pointer(block) - for { - entry := UTF16PtrToString((*uint16)(blockp)) - if len(entry) == 0 { - break + size := unsafe.Sizeof(*block) + for *block != 0 { + // find NUL terminator + end := unsafe.Pointer(block) + for *(*uint16)(end) != 0 { + end = unsafe.Add(end, size) } - env = append(env, entry) - blockp = unsafe.Add(blockp, 2*(len(entry)+1)) + + entry := unsafe.Slice(block, (uintptr(end)-uintptr(unsafe.Pointer(block)))/size) + env = append(env, UTF16ToString(entry)) + block = (*uint16)(unsafe.Add(end, size)) } return env, nil } diff --git a/vendor/golang.org/x/sys/windows/eventlog.go b/vendor/golang.org/x/sys/windows/eventlog.go index 2cd60645..6c366955 100644 --- a/vendor/golang.org/x/sys/windows/eventlog.go +++ b/vendor/golang.org/x/sys/windows/eventlog.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows diff --git a/vendor/golang.org/x/sys/windows/mksyscall.go b/vendor/golang.org/x/sys/windows/mksyscall.go index 8563f79c..dbcdb090 100644 --- a/vendor/golang.org/x/sys/windows/mksyscall.go +++ b/vendor/golang.org/x/sys/windows/mksyscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build generate -// +build generate package windows diff --git a/vendor/golang.org/x/sys/windows/race.go b/vendor/golang.org/x/sys/windows/race.go index 9196b089..0f1bdc38 100644 --- a/vendor/golang.org/x/sys/windows/race.go +++ b/vendor/golang.org/x/sys/windows/race.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && race -// +build windows,race package windows diff --git a/vendor/golang.org/x/sys/windows/race0.go b/vendor/golang.org/x/sys/windows/race0.go index 7bae4817..0c78da78 100644 --- a/vendor/golang.org/x/sys/windows/race0.go +++ b/vendor/golang.org/x/sys/windows/race0.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows && !race -// +build windows,!race package windows diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go index c44a1b96..a9dc6308 100644 --- a/vendor/golang.org/x/sys/windows/service.go +++ b/vendor/golang.org/x/sys/windows/service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows diff --git a/vendor/golang.org/x/sys/windows/str.go b/vendor/golang.org/x/sys/windows/str.go index 4fc01434..6a4f9ce6 100644 --- a/vendor/golang.org/x/sys/windows/str.go +++ b/vendor/golang.org/x/sys/windows/str.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package windows diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go index 8732cdb9..e85ed6b9 100644 --- a/vendor/golang.org/x/sys/windows/syscall.go +++ b/vendor/golang.org/x/sys/windows/syscall.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows // Package windows contains an interface to the low-level operating system // primitives. OS details vary depending on the underlying system, and diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 35cfc57c..6395a031 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -125,8 +125,7 @@ func UTF16PtrToString(p *uint16) string { for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p)) } - - return string(utf16.Decode(unsafe.Slice(p, n))) + return UTF16ToString(unsafe.Slice(p, n)) } func Getpagesize() int { return 4096 } @@ -155,6 +154,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW //sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW //sys SetDefaultDllDirectories(directoryFlags uint32) (err error) +//sys AddDllDirectory(path *uint16) (cookie uintptr, err error) = kernel32.AddDllDirectory +//sys RemoveDllDirectory(cookie uintptr) (err error) = kernel32.RemoveDllDirectory //sys SetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW //sys GetVersion() (ver uint32, err error) //sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW @@ -192,6 +193,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW //sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW //sys SetEndOfFile(handle Handle) (err error) +//sys SetFileValidData(handle Handle, validDataLength int64) (err error) //sys GetSystemTimeAsFileTime(time *Filetime) //sys GetSystemTimePreciseAsFileTime(time *Filetime) //sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] @@ -233,6 +235,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock //sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock //sys getTickCount64() (ms uint64) = kernel32.GetTickCount64 +//sys GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) //sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) //sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW //sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW @@ -969,7 +972,8 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) { if n > 0 { sl += int32(n) + 1 } - if sa.raw.Path[0] == '@' { + if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { + // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index b88dc7c8..359780f6 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -1094,7 +1094,33 @@ const ( SOMAXCONN = 0x7fffffff - TCP_NODELAY = 1 + TCP_NODELAY = 1 + TCP_EXPEDITED_1122 = 2 + TCP_KEEPALIVE = 3 + TCP_MAXSEG = 4 + TCP_MAXRT = 5 + TCP_STDURG = 6 + TCP_NOURG = 7 + TCP_ATMARK = 8 + TCP_NOSYNRETRIES = 9 + TCP_TIMESTAMPS = 10 + TCP_OFFLOAD_PREFERENCE = 11 + TCP_CONGESTION_ALGORITHM = 12 + TCP_DELAY_FIN_ACK = 13 + TCP_MAXRTMS = 14 + TCP_FASTOPEN = 15 + TCP_KEEPCNT = 16 + TCP_KEEPIDLE = TCP_KEEPALIVE + TCP_KEEPINTVL = 17 + TCP_FAIL_CONNECT_ON_ICMP_ERROR = 18 + TCP_ICMP_ERROR_INFO = 19 + + UDP_NOCHECKSUM = 1 + UDP_SEND_MSG_SIZE = 2 + UDP_RECV_MAX_COALESCED_SIZE = 3 + UDP_CHECKSUM_COVERAGE = 20 + + UDP_COALESCED_INFO = 3 SHUT_RD = 0 SHUT_WR = 1 diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 8b1688de..e8791c82 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -184,6 +184,7 @@ var ( procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") + procAddDllDirectory = modkernel32.NewProc("AddDllDirectory") procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") procCancelIo = modkernel32.NewProc("CancelIo") procCancelIoEx = modkernel32.NewProc("CancelIoEx") @@ -253,6 +254,7 @@ var ( procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW") procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle") procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx") + procGetFileTime = modkernel32.NewProc("GetFileTime") procGetFileType = modkernel32.NewProc("GetFileType") procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW") procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") @@ -329,6 +331,7 @@ var ( procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory") procReleaseMutex = modkernel32.NewProc("ReleaseMutex") procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW") + procRemoveDllDirectory = modkernel32.NewProc("RemoveDllDirectory") procResetEvent = modkernel32.NewProc("ResetEvent") procResizePseudoConsole = modkernel32.NewProc("ResizePseudoConsole") procResumeThread = modkernel32.NewProc("ResumeThread") @@ -339,6 +342,7 @@ var ( procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") + procSetFileValidData = modkernel32.NewProc("SetFileValidData") procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW") procSetErrorMode = modkernel32.NewProc("SetErrorMode") procSetEvent = modkernel32.NewProc("SetEvent") @@ -1604,6 +1608,15 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { return } +func AddDllDirectory(path *uint16) (cookie uintptr, err error) { + r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + cookie = uintptr(r0) + if cookie == 0 { + err = errnoErr(e1) + } + return +} + func AssignProcessToJobObject(job Handle, process Handle) (err error) { r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0) if r1 == 0 { @@ -2185,6 +2198,14 @@ func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, return } +func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { + r1, _, e1 := syscall.Syscall6(procGetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetFileType(filehandle Handle) (n uint32, err error) { r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0) n = uint32(r0) @@ -2870,6 +2891,14 @@ func RemoveDirectory(path *uint16) (err error) { return } +func RemoveDllDirectory(cookie uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procRemoveDllDirectory.Addr(), 1, uintptr(cookie), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func ResetEvent(event Handle) (err error) { r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0) if r1 == 0 { @@ -2960,6 +2989,14 @@ func SetEndOfFile(handle Handle) (err error) { return } +func SetFileValidData(handle Handle, validDataLength int64) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0) if r1 == 0 { diff --git a/vendor/golang.org/x/term/term_unix.go b/vendor/golang.org/x/term/term_unix.go index 62c2b3f4..1ad0ddfe 100644 --- a/vendor/golang.org/x/term/term_unix.go +++ b/vendor/golang.org/x/term/term_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package term diff --git a/vendor/golang.org/x/term/term_unix_bsd.go b/vendor/golang.org/x/term/term_unix_bsd.go index 853b3d69..9dbf5462 100644 --- a/vendor/golang.org/x/term/term_unix_bsd.go +++ b/vendor/golang.org/x/term/term_unix_bsd.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd package term diff --git a/vendor/golang.org/x/term/term_unix_other.go b/vendor/golang.org/x/term/term_unix_other.go index 1e8955c9..1b36de79 100644 --- a/vendor/golang.org/x/term/term_unix_other.go +++ b/vendor/golang.org/x/term/term_unix_other.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || linux || solaris || zos -// +build aix linux solaris zos package term diff --git a/vendor/golang.org/x/term/term_unsupported.go b/vendor/golang.org/x/term/term_unsupported.go index f1df8506..3c409e58 100644 --- a/vendor/golang.org/x/term/term_unsupported.go +++ b/vendor/golang.org/x/term/term_unsupported.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9 -// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!zos,!windows,!solaris,!plan9 package term diff --git a/vendor/google.golang.org/appengine/internal/api.go b/vendor/google.golang.org/appengine/internal/api.go index 721053c2..0569f5dd 100644 --- a/vendor/google.golang.org/appengine/internal/api.go +++ b/vendor/google.golang.org/appengine/internal/api.go @@ -2,12 +2,14 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build !appengine // +build !appengine package internal import ( "bytes" + "context" "errors" "fmt" "io/ioutil" @@ -24,7 +26,6 @@ import ( "time" "github.com/golang/protobuf/proto" - netcontext "golang.org/x/net/context" basepb "google.golang.org/appengine/internal/base" logpb "google.golang.org/appengine/internal/log" @@ -32,8 +33,7 @@ import ( ) const ( - apiPath = "/rpc_http" - defaultTicketSuffix = "/default.20150612t184001.0" + apiPath = "/rpc_http" ) var ( @@ -65,21 +65,22 @@ var ( IdleConnTimeout: 90 * time.Second, }, } - - defaultTicketOnce sync.Once - defaultTicket string - backgroundContextOnce sync.Once - backgroundContext netcontext.Context ) -func apiURL() *url.URL { +func apiURL(ctx context.Context) *url.URL { host, port := "appengine.googleapis.internal", "10001" if h := os.Getenv("API_HOST"); h != "" { host = h } + if hostOverride := ctx.Value(apiHostOverrideKey); hostOverride != nil { + host = hostOverride.(string) + } if p := os.Getenv("API_PORT"); p != "" { port = p } + if portOverride := ctx.Value(apiPortOverrideKey); portOverride != nil { + port = portOverride.(string) + } return &url.URL{ Scheme: "http", Host: host + ":" + port, @@ -87,82 +88,97 @@ func apiURL() *url.URL { } } -func handleHTTP(w http.ResponseWriter, r *http.Request) { - c := &context{ - req: r, - outHeader: w.Header(), - apiURL: apiURL(), - } - r = r.WithContext(withContext(r.Context(), c)) - c.req = r - - stopFlushing := make(chan int) +// Middleware wraps an http handler so that it can make GAE API calls +func Middleware(next http.Handler) http.Handler { + return handleHTTPMiddleware(executeRequestSafelyMiddleware(next)) +} - // Patch up RemoteAddr so it looks reasonable. - if addr := r.Header.Get(userIPHeader); addr != "" { - r.RemoteAddr = addr - } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { - r.RemoteAddr = addr - } else { - // Should not normally reach here, but pick a sensible default anyway. - r.RemoteAddr = "127.0.0.1" - } - // The address in the headers will most likely be of these forms: - // 123.123.123.123 - // 2001:db8::1 - // net/http.Request.RemoteAddr is specified to be in "IP:port" form. - if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { - // Assume the remote address is only a host; add a default port. - r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") - } +func handleHTTPMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + c := &aeContext{ + req: r, + outHeader: w.Header(), + } + r = r.WithContext(withContext(r.Context(), c)) + c.req = r + + stopFlushing := make(chan int) + + // Patch up RemoteAddr so it looks reasonable. + if addr := r.Header.Get(userIPHeader); addr != "" { + r.RemoteAddr = addr + } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { + r.RemoteAddr = addr + } else { + // Should not normally reach here, but pick a sensible default anyway. + r.RemoteAddr = "127.0.0.1" + } + // The address in the headers will most likely be of these forms: + // 123.123.123.123 + // 2001:db8::1 + // net/http.Request.RemoteAddr is specified to be in "IP:port" form. + if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { + // Assume the remote address is only a host; add a default port. + r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") + } - // Start goroutine responsible for flushing app logs. - // This is done after adding c to ctx.m (and stopped before removing it) - // because flushing logs requires making an API call. - go c.logFlusher(stopFlushing) + if logToLogservice() { + // Start goroutine responsible for flushing app logs. + // This is done after adding c to ctx.m (and stopped before removing it) + // because flushing logs requires making an API call. + go c.logFlusher(stopFlushing) + } - executeRequestSafely(c, r) - c.outHeader = nil // make sure header changes aren't respected any more + next.ServeHTTP(c, r) + c.outHeader = nil // make sure header changes aren't respected any more - stopFlushing <- 1 // any logging beyond this point will be dropped + flushed := make(chan struct{}) + if logToLogservice() { + stopFlushing <- 1 // any logging beyond this point will be dropped - // Flush any pending logs asynchronously. - c.pendingLogs.Lock() - flushes := c.pendingLogs.flushes - if len(c.pendingLogs.lines) > 0 { - flushes++ - } - c.pendingLogs.Unlock() - flushed := make(chan struct{}) - go func() { - defer close(flushed) - // Force a log flush, because with very short requests we - // may not ever flush logs. - c.flushLog(true) - }() - w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) + // Flush any pending logs asynchronously. + c.pendingLogs.Lock() + flushes := c.pendingLogs.flushes + if len(c.pendingLogs.lines) > 0 { + flushes++ + } + c.pendingLogs.Unlock() + go func() { + defer close(flushed) + // Force a log flush, because with very short requests we + // may not ever flush logs. + c.flushLog(true) + }() + w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) + } - // Avoid nil Write call if c.Write is never called. - if c.outCode != 0 { - w.WriteHeader(c.outCode) - } - if c.outBody != nil { - w.Write(c.outBody) - } - // Wait for the last flush to complete before returning, - // otherwise the security ticket will not be valid. - <-flushed + // Avoid nil Write call if c.Write is never called. + if c.outCode != 0 { + w.WriteHeader(c.outCode) + } + if c.outBody != nil { + w.Write(c.outBody) + } + if logToLogservice() { + // Wait for the last flush to complete before returning, + // otherwise the security ticket will not be valid. + <-flushed + } + }) } -func executeRequestSafely(c *context, r *http.Request) { - defer func() { - if x := recover(); x != nil { - logf(c, 4, "%s", renderPanic(x)) // 4 == critical - c.outCode = 500 - } - }() +func executeRequestSafelyMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + defer func() { + if x := recover(); x != nil { + c := w.(*aeContext) + logf(c, 4, "%s", renderPanic(x)) // 4 == critical + c.outCode = 500 + } + }() - http.DefaultServeMux.ServeHTTP(c, r) + next.ServeHTTP(w, r) + }) } func renderPanic(x interface{}) string { @@ -204,9 +220,9 @@ func renderPanic(x interface{}) string { return string(buf) } -// context represents the context of an in-flight HTTP request. +// aeContext represents the aeContext of an in-flight HTTP request. // It implements the appengine.Context and http.ResponseWriter interfaces. -type context struct { +type aeContext struct { req *http.Request outCode int @@ -218,8 +234,6 @@ type context struct { lines []*logpb.UserAppLogLine flushes int } - - apiURL *url.URL } var contextKey = "holds a *context" @@ -227,8 +241,8 @@ var contextKey = "holds a *context" // jointContext joins two contexts in a superficial way. // It takes values and timeouts from a base context, and only values from another context. type jointContext struct { - base netcontext.Context - valuesOnly netcontext.Context + base context.Context + valuesOnly context.Context } func (c jointContext) Deadline() (time.Time, bool) { @@ -252,94 +266,54 @@ func (c jointContext) Value(key interface{}) interface{} { // fromContext returns the App Engine context or nil if ctx is not // derived from an App Engine context. -func fromContext(ctx netcontext.Context) *context { - c, _ := ctx.Value(&contextKey).(*context) +func fromContext(ctx context.Context) *aeContext { + c, _ := ctx.Value(&contextKey).(*aeContext) return c } -func withContext(parent netcontext.Context, c *context) netcontext.Context { - ctx := netcontext.WithValue(parent, &contextKey, c) +func withContext(parent context.Context, c *aeContext) context.Context { + ctx := context.WithValue(parent, &contextKey, c) if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { ctx = withNamespace(ctx, ns) } return ctx } -func toContext(c *context) netcontext.Context { - return withContext(netcontext.Background(), c) +func toContext(c *aeContext) context.Context { + return withContext(context.Background(), c) } -func IncomingHeaders(ctx netcontext.Context) http.Header { +func IncomingHeaders(ctx context.Context) http.Header { if c := fromContext(ctx); c != nil { return c.req.Header } return nil } -func ReqContext(req *http.Request) netcontext.Context { +func ReqContext(req *http.Request) context.Context { return req.Context() } -func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { +func WithContext(parent context.Context, req *http.Request) context.Context { return jointContext{ base: parent, valuesOnly: req.Context(), } } -// DefaultTicket returns a ticket used for background context or dev_appserver. -func DefaultTicket() string { - defaultTicketOnce.Do(func() { - if IsDevAppServer() { - defaultTicket = "testapp" + defaultTicketSuffix - return - } - appID := partitionlessAppID() - escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1) - majVersion := VersionID(nil) - if i := strings.Index(majVersion, "."); i > 0 { - majVersion = majVersion[:i] - } - defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID()) - }) - return defaultTicket -} - -func BackgroundContext() netcontext.Context { - backgroundContextOnce.Do(func() { - // Compute background security ticket. - ticket := DefaultTicket() - - c := &context{ - req: &http.Request{ - Header: http.Header{ - ticketHeader: []string{ticket}, - }, - }, - apiURL: apiURL(), - } - backgroundContext = toContext(c) - - // TODO(dsymonds): Wire up the shutdown handler to do a final flush. - go c.logFlusher(make(chan int)) - }) - - return backgroundContext -} - // RegisterTestRequest registers the HTTP request req for testing, such that -// any API calls are sent to the provided URL. It returns a closure to delete -// the registration. +// any API calls are sent to the provided URL. // It should only be used by aetest package. -func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) { - c := &context{ - req: req, - apiURL: apiURL, - } - ctx := withContext(decorate(req.Context()), c) - req = req.WithContext(ctx) - c.req = req - return req, func() {} +func RegisterTestRequest(req *http.Request, apiURL *url.URL, appID string) *http.Request { + ctx := req.Context() + ctx = withAPIHostOverride(ctx, apiURL.Hostname()) + ctx = withAPIPortOverride(ctx, apiURL.Port()) + ctx = WithAppIDOverride(ctx, appID) + + // use the unregistered request as a placeholder so that withContext can read the headers + c := &aeContext{req: req} + c.req = req.WithContext(withContext(ctx, c)) + return c.req } var errTimeout = &CallError{ @@ -348,7 +322,7 @@ var errTimeout = &CallError{ Timeout: true, } -func (c *context) Header() http.Header { return c.outHeader } +func (c *aeContext) Header() http.Header { return c.outHeader } // Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status // codes do not permit a response body (nor response entity headers such as @@ -365,7 +339,7 @@ func bodyAllowedForStatus(status int) bool { return true } -func (c *context) Write(b []byte) (int, error) { +func (c *aeContext) Write(b []byte) (int, error) { if c.outCode == 0 { c.WriteHeader(http.StatusOK) } @@ -376,7 +350,7 @@ func (c *context) Write(b []byte) (int, error) { return len(b), nil } -func (c *context) WriteHeader(code int) { +func (c *aeContext) WriteHeader(code int) { if c.outCode != 0 { logf(c, 3, "WriteHeader called multiple times on request.") // error level return @@ -384,10 +358,11 @@ func (c *context) WriteHeader(code int) { c.outCode = code } -func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) { +func post(ctx context.Context, body []byte, timeout time.Duration) (b []byte, err error) { + apiURL := apiURL(ctx) hreq := &http.Request{ Method: "POST", - URL: c.apiURL, + URL: apiURL, Header: http.Header{ apiEndpointHeader: apiEndpointHeaderValue, apiMethodHeader: apiMethodHeaderValue, @@ -396,13 +371,16 @@ func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) }, Body: ioutil.NopCloser(bytes.NewReader(body)), ContentLength: int64(len(body)), - Host: c.apiURL.Host, - } - if info := c.req.Header.Get(dapperHeader); info != "" { - hreq.Header.Set(dapperHeader, info) + Host: apiURL.Host, } - if info := c.req.Header.Get(traceHeader); info != "" { - hreq.Header.Set(traceHeader, info) + c := fromContext(ctx) + if c != nil { + if info := c.req.Header.Get(dapperHeader); info != "" { + hreq.Header.Set(dapperHeader, info) + } + if info := c.req.Header.Get(traceHeader); info != "" { + hreq.Header.Set(traceHeader, info) + } } tr := apiHTTPClient.Transport.(*http.Transport) @@ -444,7 +422,7 @@ func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) return hrespBody, nil } -func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { +func Call(ctx context.Context, service, method string, in, out proto.Message) error { if ns := NamespaceFromContext(ctx); ns != "" { if fn, ok := NamespaceMods[service]; ok { fn(in, ns) @@ -463,15 +441,11 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message) } c := fromContext(ctx) - if c == nil { - // Give a good error message rather than a panic lower down. - return errNotAppEngineContext - } // Apply transaction modifications if we're in a transaction. if t := transactionFromContext(ctx); t != nil { if t.finished { - return errors.New("transaction context has expired") + return errors.New("transaction aeContext has expired") } applyTransaction(in, &t.transaction) } @@ -487,20 +461,13 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message) return err } - ticket := c.req.Header.Get(ticketHeader) - // Use a test ticket under test environment. - if ticket == "" { - if appid := ctx.Value(&appIDOverrideKey); appid != nil { - ticket = appid.(string) + defaultTicketSuffix + ticket := "" + if c != nil { + ticket = c.req.Header.Get(ticketHeader) + if dri := c.req.Header.Get(devRequestIdHeader); IsDevAppServer() && dri != "" { + ticket = dri } } - // Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver. - if ticket == "" { - ticket = DefaultTicket() - } - if dri := c.req.Header.Get(devRequestIdHeader); IsDevAppServer() && dri != "" { - ticket = dri - } req := &remotepb.Request{ ServiceName: &service, Method: &method, @@ -512,7 +479,7 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message) return err } - hrespBody, err := c.post(hreqBody, timeout) + hrespBody, err := post(ctx, hreqBody, timeout) if err != nil { return err } @@ -549,11 +516,11 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message) return proto.Unmarshal(res.Response, out) } -func (c *context) Request() *http.Request { +func (c *aeContext) Request() *http.Request { return c.req } -func (c *context) addLogLine(ll *logpb.UserAppLogLine) { +func (c *aeContext) addLogLine(ll *logpb.UserAppLogLine) { // Truncate long log lines. // TODO(dsymonds): Check if this is still necessary. const lim = 8 << 10 @@ -575,18 +542,20 @@ var logLevelName = map[int64]string{ 4: "CRITICAL", } -func logf(c *context, level int64, format string, args ...interface{}) { +func logf(c *aeContext, level int64, format string, args ...interface{}) { if c == nil { - panic("not an App Engine context") + panic("not an App Engine aeContext") } s := fmt.Sprintf(format, args...) s = strings.TrimRight(s, "\n") // Remove any trailing newline characters. - c.addLogLine(&logpb.UserAppLogLine{ - TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), - Level: &level, - Message: &s, - }) - // Only duplicate log to stderr if not running on App Engine second generation + if logToLogservice() { + c.addLogLine(&logpb.UserAppLogLine{ + TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), + Level: &level, + Message: &s, + }) + } + // Log to stdout if not deployed if !IsSecondGen() { log.Print(logLevelName[level] + ": " + s) } @@ -594,7 +563,7 @@ func logf(c *context, level int64, format string, args ...interface{}) { // flushLog attempts to flush any pending logs to the appserver. // It should not be called concurrently. -func (c *context) flushLog(force bool) (flushed bool) { +func (c *aeContext) flushLog(force bool) (flushed bool) { c.pendingLogs.Lock() // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious. n, rem := 0, 30<<20 @@ -655,7 +624,7 @@ const ( forceFlushInterval = 60 * time.Second ) -func (c *context) logFlusher(stop <-chan int) { +func (c *aeContext) logFlusher(stop <-chan int) { lastFlush := time.Now() tick := time.NewTicker(flushInterval) for { @@ -673,6 +642,12 @@ func (c *context) logFlusher(stop <-chan int) { } } -func ContextForTesting(req *http.Request) netcontext.Context { - return toContext(&context{req: req}) +func ContextForTesting(req *http.Request) context.Context { + return toContext(&aeContext{req: req}) +} + +func logToLogservice() bool { + // TODO: replace logservice with json structured logs to $LOG_DIR/app.log.json + // where $LOG_DIR is /var/log in prod and some tmpdir in dev + return os.Getenv("LOG_TO_LOGSERVICE") != "0" } diff --git a/vendor/google.golang.org/appengine/internal/api_classic.go b/vendor/google.golang.org/appengine/internal/api_classic.go index f0f40b2e..87c33c79 100644 --- a/vendor/google.golang.org/appengine/internal/api_classic.go +++ b/vendor/google.golang.org/appengine/internal/api_classic.go @@ -2,11 +2,13 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build appengine // +build appengine package internal import ( + "context" "errors" "fmt" "net/http" @@ -17,20 +19,19 @@ import ( basepb "appengine_internal/base" "github.com/golang/protobuf/proto" - netcontext "golang.org/x/net/context" ) var contextKey = "holds an appengine.Context" // fromContext returns the App Engine context or nil if ctx is not // derived from an App Engine context. -func fromContext(ctx netcontext.Context) appengine.Context { +func fromContext(ctx context.Context) appengine.Context { c, _ := ctx.Value(&contextKey).(appengine.Context) return c } // This is only for classic App Engine adapters. -func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error) { +func ClassicContextFromContext(ctx context.Context) (appengine.Context, error) { c := fromContext(ctx) if c == nil { return nil, errNotAppEngineContext @@ -38,8 +39,8 @@ func ClassicContextFromContext(ctx netcontext.Context) (appengine.Context, error return c, nil } -func withContext(parent netcontext.Context, c appengine.Context) netcontext.Context { - ctx := netcontext.WithValue(parent, &contextKey, c) +func withContext(parent context.Context, c appengine.Context) context.Context { + ctx := context.WithValue(parent, &contextKey, c) s := &basepb.StringProto{} c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil) @@ -50,7 +51,7 @@ func withContext(parent netcontext.Context, c appengine.Context) netcontext.Cont return ctx } -func IncomingHeaders(ctx netcontext.Context) http.Header { +func IncomingHeaders(ctx context.Context) http.Header { if c := fromContext(ctx); c != nil { if req, ok := c.Request().(*http.Request); ok { return req.Header @@ -59,11 +60,11 @@ func IncomingHeaders(ctx netcontext.Context) http.Header { return nil } -func ReqContext(req *http.Request) netcontext.Context { - return WithContext(netcontext.Background(), req) +func ReqContext(req *http.Request) context.Context { + return WithContext(context.Background(), req) } -func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { +func WithContext(parent context.Context, req *http.Request) context.Context { c := appengine.NewContext(req) return withContext(parent, c) } @@ -83,11 +84,11 @@ func (t *testingContext) Call(service, method string, _, _ appengine_internal.Pr } func (t *testingContext) Request() interface{} { return t.req } -func ContextForTesting(req *http.Request) netcontext.Context { - return withContext(netcontext.Background(), &testingContext{req: req}) +func ContextForTesting(req *http.Request) context.Context { + return withContext(context.Background(), &testingContext{req: req}) } -func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { +func Call(ctx context.Context, service, method string, in, out proto.Message) error { if ns := NamespaceFromContext(ctx); ns != "" { if fn, ok := NamespaceMods[service]; ok { fn(in, ns) @@ -144,8 +145,8 @@ func Call(ctx netcontext.Context, service, method string, in, out proto.Message) return err } -func handleHTTP(w http.ResponseWriter, r *http.Request) { - panic("handleHTTP called; this should be impossible") +func Middleware(next http.Handler) http.Handler { + panic("Middleware called; this should be impossible") } func logf(c appengine.Context, level int64, format string, args ...interface{}) { diff --git a/vendor/google.golang.org/appengine/internal/api_common.go b/vendor/google.golang.org/appengine/internal/api_common.go index e0c0b214..5b95c13d 100644 --- a/vendor/google.golang.org/appengine/internal/api_common.go +++ b/vendor/google.golang.org/appengine/internal/api_common.go @@ -5,20 +5,26 @@ package internal import ( + "context" "errors" "os" "github.com/golang/protobuf/proto" - netcontext "golang.org/x/net/context" ) +type ctxKey string + +func (c ctxKey) String() string { + return "appengine context key: " + string(c) +} + var errNotAppEngineContext = errors.New("not an App Engine context") -type CallOverrideFunc func(ctx netcontext.Context, service, method string, in, out proto.Message) error +type CallOverrideFunc func(ctx context.Context, service, method string, in, out proto.Message) error var callOverrideKey = "holds []CallOverrideFunc" -func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Context { +func WithCallOverride(ctx context.Context, f CallOverrideFunc) context.Context { // We avoid appending to any existing call override // so we don't risk overwriting a popped stack below. var cofs []CallOverrideFunc @@ -26,10 +32,10 @@ func WithCallOverride(ctx netcontext.Context, f CallOverrideFunc) netcontext.Con cofs = append(cofs, uf...) } cofs = append(cofs, f) - return netcontext.WithValue(ctx, &callOverrideKey, cofs) + return context.WithValue(ctx, &callOverrideKey, cofs) } -func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netcontext.Context, bool) { +func callOverrideFromContext(ctx context.Context) (CallOverrideFunc, context.Context, bool) { cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc) if len(cofs) == 0 { return nil, nil, false @@ -37,7 +43,7 @@ func callOverrideFromContext(ctx netcontext.Context) (CallOverrideFunc, netconte // We found a list of overrides; grab the last, and reconstitute a // context that will hide it. f := cofs[len(cofs)-1] - ctx = netcontext.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1]) + ctx = context.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1]) return f, ctx, true } @@ -45,23 +51,35 @@ type logOverrideFunc func(level int64, format string, args ...interface{}) var logOverrideKey = "holds a logOverrideFunc" -func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context { - return netcontext.WithValue(ctx, &logOverrideKey, f) +func WithLogOverride(ctx context.Context, f logOverrideFunc) context.Context { + return context.WithValue(ctx, &logOverrideKey, f) } var appIDOverrideKey = "holds a string, being the full app ID" -func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context { - return netcontext.WithValue(ctx, &appIDOverrideKey, appID) +func WithAppIDOverride(ctx context.Context, appID string) context.Context { + return context.WithValue(ctx, &appIDOverrideKey, appID) +} + +var apiHostOverrideKey = ctxKey("holds a string, being the alternate API_HOST") + +func withAPIHostOverride(ctx context.Context, apiHost string) context.Context { + return context.WithValue(ctx, apiHostOverrideKey, apiHost) +} + +var apiPortOverrideKey = ctxKey("holds a string, being the alternate API_PORT") + +func withAPIPortOverride(ctx context.Context, apiPort string) context.Context { + return context.WithValue(ctx, apiPortOverrideKey, apiPort) } var namespaceKey = "holds the namespace string" -func withNamespace(ctx netcontext.Context, ns string) netcontext.Context { - return netcontext.WithValue(ctx, &namespaceKey, ns) +func withNamespace(ctx context.Context, ns string) context.Context { + return context.WithValue(ctx, &namespaceKey, ns) } -func NamespaceFromContext(ctx netcontext.Context) string { +func NamespaceFromContext(ctx context.Context) string { // If there's no namespace, return the empty string. ns, _ := ctx.Value(&namespaceKey).(string) return ns @@ -70,14 +88,14 @@ func NamespaceFromContext(ctx netcontext.Context) string { // FullyQualifiedAppID returns the fully-qualified application ID. // This may contain a partition prefix (e.g. "s~" for High Replication apps), // or a domain prefix (e.g. "example.com:"). -func FullyQualifiedAppID(ctx netcontext.Context) string { +func FullyQualifiedAppID(ctx context.Context) string { if id, ok := ctx.Value(&appIDOverrideKey).(string); ok { return id } return fullyQualifiedAppID(ctx) } -func Logf(ctx netcontext.Context, level int64, format string, args ...interface{}) { +func Logf(ctx context.Context, level int64, format string, args ...interface{}) { if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok { f(level, format, args...) return @@ -90,7 +108,7 @@ func Logf(ctx netcontext.Context, level int64, format string, args ...interface{ } // NamespacedContext wraps a Context to support namespaces. -func NamespacedContext(ctx netcontext.Context, namespace string) netcontext.Context { +func NamespacedContext(ctx context.Context, namespace string) context.Context { return withNamespace(ctx, namespace) } diff --git a/vendor/google.golang.org/appengine/internal/identity.go b/vendor/google.golang.org/appengine/internal/identity.go index 9b4134e4..0f95aa91 100644 --- a/vendor/google.golang.org/appengine/internal/identity.go +++ b/vendor/google.golang.org/appengine/internal/identity.go @@ -5,9 +5,8 @@ package internal import ( + "context" "os" - - netcontext "golang.org/x/net/context" ) var ( @@ -23,7 +22,7 @@ var ( // AppID is the implementation of the wrapper function of the same name in // ../identity.go. See that file for commentary. -func AppID(c netcontext.Context) string { +func AppID(c context.Context) string { return appID(FullyQualifiedAppID(c)) } @@ -35,7 +34,7 @@ func IsStandard() bool { return appengineStandard || IsSecondGen() } -// IsStandard is the implementation of the wrapper function of the same name in +// IsSecondGen is the implementation of the wrapper function of the same name in // ../appengine.go. See that file for commentary. func IsSecondGen() bool { // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime. diff --git a/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/google.golang.org/appengine/internal/identity_classic.go index 4e979f45..5ad3548b 100644 --- a/vendor/google.golang.org/appengine/internal/identity_classic.go +++ b/vendor/google.golang.org/appengine/internal/identity_classic.go @@ -2,21 +2,22 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build appengine // +build appengine package internal import ( - "appengine" + "context" - netcontext "golang.org/x/net/context" + "appengine" ) func init() { appengineStandard = true } -func DefaultVersionHostname(ctx netcontext.Context) string { +func DefaultVersionHostname(ctx context.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) @@ -24,12 +25,12 @@ func DefaultVersionHostname(ctx netcontext.Context) string { return appengine.DefaultVersionHostname(c) } -func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() } -func ServerSoftware() string { return appengine.ServerSoftware() } -func InstanceID() string { return appengine.InstanceID() } -func IsDevAppServer() bool { return appengine.IsDevAppServer() } +func Datacenter(_ context.Context) string { return appengine.Datacenter() } +func ServerSoftware() string { return appengine.ServerSoftware() } +func InstanceID() string { return appengine.InstanceID() } +func IsDevAppServer() bool { return appengine.IsDevAppServer() } -func RequestID(ctx netcontext.Context) string { +func RequestID(ctx context.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) @@ -37,14 +38,14 @@ func RequestID(ctx netcontext.Context) string { return appengine.RequestID(c) } -func ModuleName(ctx netcontext.Context) string { +func ModuleName(ctx context.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) } return appengine.ModuleName(c) } -func VersionID(ctx netcontext.Context) string { +func VersionID(ctx context.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) @@ -52,7 +53,7 @@ func VersionID(ctx netcontext.Context) string { return appengine.VersionID(c) } -func fullyQualifiedAppID(ctx netcontext.Context) string { +func fullyQualifiedAppID(ctx context.Context) string { c := fromContext(ctx) if c == nil { panic(errNotAppEngineContext) diff --git a/vendor/google.golang.org/appengine/internal/identity_flex.go b/vendor/google.golang.org/appengine/internal/identity_flex.go index d5e2e7b5..4201b6b5 100644 --- a/vendor/google.golang.org/appengine/internal/identity_flex.go +++ b/vendor/google.golang.org/appengine/internal/identity_flex.go @@ -2,6 +2,7 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build appenginevm // +build appenginevm package internal diff --git a/vendor/google.golang.org/appengine/internal/identity_vm.go b/vendor/google.golang.org/appengine/internal/identity_vm.go index 5d806726..18ddda3a 100644 --- a/vendor/google.golang.org/appengine/internal/identity_vm.go +++ b/vendor/google.golang.org/appengine/internal/identity_vm.go @@ -2,17 +2,17 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build !appengine // +build !appengine package internal import ( + "context" "log" "net/http" "os" "strings" - - netcontext "golang.org/x/net/context" ) // These functions are implementations of the wrapper functions @@ -24,7 +24,7 @@ const ( hDatacenter = "X-AppEngine-Datacenter" ) -func ctxHeaders(ctx netcontext.Context) http.Header { +func ctxHeaders(ctx context.Context) http.Header { c := fromContext(ctx) if c == nil { return nil @@ -32,15 +32,15 @@ func ctxHeaders(ctx netcontext.Context) http.Header { return c.Request().Header } -func DefaultVersionHostname(ctx netcontext.Context) string { +func DefaultVersionHostname(ctx context.Context) string { return ctxHeaders(ctx).Get(hDefaultVersionHostname) } -func RequestID(ctx netcontext.Context) string { +func RequestID(ctx context.Context) string { return ctxHeaders(ctx).Get(hRequestLogId) } -func Datacenter(ctx netcontext.Context) string { +func Datacenter(ctx context.Context) string { if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" { return dc } @@ -71,7 +71,7 @@ func ServerSoftware() string { // TODO(dsymonds): Remove the metadata fetches. -func ModuleName(_ netcontext.Context) string { +func ModuleName(_ context.Context) string { if s := os.Getenv("GAE_MODULE_NAME"); s != "" { return s } @@ -81,7 +81,7 @@ func ModuleName(_ netcontext.Context) string { return string(mustGetMetadata("instance/attributes/gae_backend_name")) } -func VersionID(_ netcontext.Context) string { +func VersionID(_ context.Context) string { if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" { return s1 + "." + s2 } @@ -112,7 +112,7 @@ func partitionlessAppID() string { return string(mustGetMetadata("instance/attributes/gae_project")) } -func fullyQualifiedAppID(_ netcontext.Context) string { +func fullyQualifiedAppID(_ context.Context) string { if s := os.Getenv("GAE_APPLICATION"); s != "" { return s } @@ -130,5 +130,5 @@ func fullyQualifiedAppID(_ netcontext.Context) string { } func IsDevAppServer() bool { - return os.Getenv("RUN_WITH_DEVAPPSERVER") != "" + return os.Getenv("RUN_WITH_DEVAPPSERVER") != "" || os.Getenv("GAE_ENV") == "localdev" } diff --git a/vendor/google.golang.org/appengine/internal/main.go b/vendor/google.golang.org/appengine/internal/main.go index 1e765312..afd0ae84 100644 --- a/vendor/google.golang.org/appengine/internal/main.go +++ b/vendor/google.golang.org/appengine/internal/main.go @@ -2,6 +2,7 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build appengine // +build appengine package internal diff --git a/vendor/google.golang.org/appengine/internal/main_vm.go b/vendor/google.golang.org/appengine/internal/main_vm.go index ddb79a33..86a8caf0 100644 --- a/vendor/google.golang.org/appengine/internal/main_vm.go +++ b/vendor/google.golang.org/appengine/internal/main_vm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. +//go:build !appengine // +build !appengine package internal @@ -29,7 +30,7 @@ func Main() { if IsDevAppServer() { host = "127.0.0.1" } - if err := http.ListenAndServe(host+":"+port, http.HandlerFunc(handleHTTP)); err != nil { + if err := http.ListenAndServe(host+":"+port, Middleware(http.DefaultServeMux)); err != nil { log.Fatalf("http.ListenAndServe: %v", err) } } diff --git a/vendor/google.golang.org/appengine/internal/transaction.go b/vendor/google.golang.org/appengine/internal/transaction.go index 9006ae65..2ae8ab9f 100644 --- a/vendor/google.golang.org/appengine/internal/transaction.go +++ b/vendor/google.golang.org/appengine/internal/transaction.go @@ -7,11 +7,11 @@ package internal // This file implements hooks for applying datastore transactions. import ( + "context" "errors" "reflect" "github.com/golang/protobuf/proto" - netcontext "golang.org/x/net/context" basepb "google.golang.org/appengine/internal/base" pb "google.golang.org/appengine/internal/datastore" @@ -38,13 +38,13 @@ func applyTransaction(pb proto.Message, t *pb.Transaction) { var transactionKey = "used for *Transaction" -func transactionFromContext(ctx netcontext.Context) *transaction { +func transactionFromContext(ctx context.Context) *transaction { t, _ := ctx.Value(&transactionKey).(*transaction) return t } -func withTransaction(ctx netcontext.Context, t *transaction) netcontext.Context { - return netcontext.WithValue(ctx, &transactionKey, t) +func withTransaction(ctx context.Context, t *transaction) context.Context { + return context.WithValue(ctx, &transactionKey, t) } type transaction struct { @@ -54,7 +54,7 @@ type transaction struct { var ErrConcurrentTransaction = errors.New("internal: concurrent transaction") -func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) { +func RunTransactionOnce(c context.Context, f func(context.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) { if transactionFromContext(c) != nil { return nil, errors.New("nested transactions are not supported") } diff --git a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go b/vendor/google.golang.org/appengine/urlfetch/urlfetch.go index 6ffe1e6d..6c0d7241 100644 --- a/vendor/google.golang.org/appengine/urlfetch/urlfetch.go +++ b/vendor/google.golang.org/appengine/urlfetch/urlfetch.go @@ -7,6 +7,7 @@ package urlfetch // import "google.golang.org/appengine/urlfetch" import ( + "context" "errors" "fmt" "io" @@ -18,7 +19,6 @@ import ( "time" "github.com/golang/protobuf/proto" - "golang.org/x/net/context" "google.golang.org/appengine/internal" pb "google.golang.org/appengine/internal/urlfetch" @@ -44,11 +44,10 @@ type Transport struct { var _ http.RoundTripper = (*Transport)(nil) // Client returns an *http.Client using a default urlfetch Transport. This -// client will have the default deadline of 5 seconds, and will check the -// validity of SSL certificates. +// client will check the validity of SSL certificates. // -// Any deadline of the provided context will be used for requests through this client; -// if the client does not have a deadline then a 5 second default is used. +// Any deadline of the provided context will be used for requests through this client. +// If the client does not have a deadline, then an App Engine default of 60 second is used. func Client(ctx context.Context) *http.Client { return &http.Client{ Transport: &Transport{ diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index 4921b2d4..a45f112b 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -21,7 +21,7 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" ) -// Unmarshal reads the given []byte into the given proto.Message. +// Unmarshal reads the given []byte into the given [proto.Message]. // The provided message must be mutable (e.g., a non-nil pointer to a message). func Unmarshal(b []byte, m proto.Message) error { return UnmarshalOptions{}.Unmarshal(b, m) @@ -51,7 +51,7 @@ type UnmarshalOptions struct { } } -// Unmarshal reads the given []byte and populates the given proto.Message +// Unmarshal reads the given []byte and populates the given [proto.Message] // using options in the UnmarshalOptions object. // The provided message must be mutable (e.g., a non-nil pointer to a message). func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error { @@ -739,7 +739,9 @@ func (d decoder) skipValue() error { case text.ListClose: return nil case text.MessageOpen: - return d.skipMessageValue() + if err := d.skipMessageValue(); err != nil { + return err + } default: // Skip items. This will not validate whether skipped values are // of the same type or not, same behavior as C++ diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go index ebf6c652..95967e81 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go @@ -33,7 +33,7 @@ func Format(m proto.Message) string { return MarshalOptions{Multiline: true}.Format(m) } -// Marshal writes the given proto.Message in textproto format using default +// Marshal writes the given [proto.Message] in textproto format using default // options. Do not depend on the output being stable. It may change over time // across different versions of the program. func Marshal(m proto.Message) ([]byte, error) { @@ -97,17 +97,23 @@ func (o MarshalOptions) Format(m proto.Message) string { return string(b) } -// Marshal writes the given proto.Message in textproto format using options in +// Marshal writes the given [proto.Message] in textproto format using options in // MarshalOptions object. Do not depend on the output being stable. It may // change over time across different versions of the program. func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) { - return o.marshal(m) + return o.marshal(nil, m) +} + +// MarshalAppend appends the textproto format encoding of m to b, +// returning the result. +func (o MarshalOptions) MarshalAppend(b []byte, m proto.Message) ([]byte, error) { + return o.marshal(b, m) } // marshal is a centralized function that all marshal operations go through. // For profiling purposes, avoid changing the name of this function or // introducing other code paths for marshal that do not go through this. -func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) { +func (o MarshalOptions) marshal(b []byte, m proto.Message) ([]byte, error) { var delims = [2]byte{'{', '}'} if o.Multiline && o.Indent == "" { @@ -117,7 +123,7 @@ func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) { o.Resolver = protoregistry.GlobalTypes } - internalEnc, err := text.NewEncoder(o.Indent, delims, o.EmitASCII) + internalEnc, err := text.NewEncoder(b, o.Indent, delims, o.EmitASCII) if err != nil { return nil, err } @@ -125,7 +131,7 @@ func (o MarshalOptions) marshal(m proto.Message) ([]byte, error) { // Treat nil message interface as an empty message, // in which case there is nothing to output. if m == nil { - return []byte{}, nil + return b, nil } enc := encoder{internalEnc, o} diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go index ce57f57e..e942bc98 100644 --- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +++ b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go @@ -3,10 +3,10 @@ // license that can be found in the LICENSE file. // Package protowire parses and formats the raw wire encoding. -// See https://developers.google.com/protocol-buffers/docs/encoding. +// See https://protobuf.dev/programming-guides/encoding. // // For marshaling and unmarshaling entire protobuf messages, -// use the "google.golang.org/protobuf/proto" package instead. +// use the [google.golang.org/protobuf/proto] package instead. package protowire import ( @@ -29,12 +29,8 @@ const ( ) // IsValid reports whether the field number is semantically valid. -// -// Note that while numbers within the reserved range are semantically invalid, -// they are syntactically valid in the wire format. -// Implementations may treat records with reserved field numbers as unknown. func (n Number) IsValid() bool { - return MinValidNumber <= n && n < FirstReservedNumber || LastReservedNumber < n && n <= MaxValidNumber + return MinValidNumber <= n && n <= MaxValidNumber } // Type represents the wire type. @@ -91,7 +87,7 @@ func ParseError(n int) error { // ConsumeField parses an entire field record (both tag and value) and returns // the field number, the wire type, and the total length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). // // The total length includes the tag header and the end group marker (if the // field is a group). @@ -108,8 +104,8 @@ func ConsumeField(b []byte) (Number, Type, int) { } // ConsumeFieldValue parses a field value and returns its length. -// This assumes that the field Number and wire Type have already been parsed. -// This returns a negative length upon an error (see ParseError). +// This assumes that the field [Number] and wire [Type] have already been parsed. +// This returns a negative length upon an error (see [ParseError]). // // When parsing a group, the length includes the end group marker and // the end group is verified to match the starting field number. @@ -168,7 +164,7 @@ func AppendTag(b []byte, num Number, typ Type) []byte { } // ConsumeTag parses b as a varint-encoded tag, reporting its length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeTag(b []byte) (Number, Type, int) { v, n := ConsumeVarint(b) if n < 0 { @@ -267,7 +263,7 @@ func AppendVarint(b []byte, v uint64) []byte { } // ConsumeVarint parses b as a varint-encoded uint64, reporting its length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeVarint(b []byte) (v uint64, n int) { var y uint64 if len(b) <= 0 { @@ -388,7 +384,7 @@ func AppendFixed32(b []byte, v uint32) []byte { } // ConsumeFixed32 parses b as a little-endian uint32, reporting its length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeFixed32(b []byte) (v uint32, n int) { if len(b) < 4 { return 0, errCodeTruncated @@ -416,7 +412,7 @@ func AppendFixed64(b []byte, v uint64) []byte { } // ConsumeFixed64 parses b as a little-endian uint64, reporting its length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeFixed64(b []byte) (v uint64, n int) { if len(b) < 8 { return 0, errCodeTruncated @@ -436,7 +432,7 @@ func AppendBytes(b []byte, v []byte) []byte { } // ConsumeBytes parses b as a length-prefixed bytes value, reporting its length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeBytes(b []byte) (v []byte, n int) { m, n := ConsumeVarint(b) if n < 0 { @@ -460,7 +456,7 @@ func AppendString(b []byte, v string) []byte { } // ConsumeString parses b as a length-prefixed bytes value, reporting its length. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeString(b []byte) (v string, n int) { bb, n := ConsumeBytes(b) return string(bb), n @@ -475,7 +471,7 @@ func AppendGroup(b []byte, num Number, v []byte) []byte { // ConsumeGroup parses b as a group value until the trailing end group marker, // and verifies that the end marker matches the provided num. The value v // does not contain the end marker, while the length does contain the end marker. -// This returns a negative length upon an error (see ParseError). +// This returns a negative length upon an error (see [ParseError]). func ConsumeGroup(num Number, b []byte) (v []byte, n int) { n = ConsumeFieldValue(num, StartGroupType, b) if n < 0 { @@ -499,8 +495,8 @@ func SizeGroup(num Number, n int) int { return n + SizeTag(num) } -// DecodeTag decodes the field Number and wire Type from its unified form. -// The Number is -1 if the decoded field number overflows int32. +// DecodeTag decodes the field [Number] and wire [Type] from its unified form. +// The [Number] is -1 if the decoded field number overflows int32. // Other than overflow, this does not check for field number validity. func DecodeTag(x uint64) (Number, Type) { // NOTE: MessageSet allows for larger field numbers than normal. @@ -510,7 +506,7 @@ func DecodeTag(x uint64) (Number, Type) { return Number(x >> 3), Type(x & 7) } -// EncodeTag encodes the field Number and wire Type into its unified form. +// EncodeTag encodes the field [Number] and wire [Type] into its unified form. func EncodeTag(num Number, typ Type) uint64 { return uint64(num)<<3 | uint64(typ&7) } diff --git a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go index db5248e1..a45625c8 100644 --- a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +++ b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go @@ -83,7 +83,13 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { case protoreflect.FileImports: for i := 0; i < vs.Len(); i++ { var rs records - rs.Append(reflect.ValueOf(vs.Get(i)), "Path", "Package", "IsPublic", "IsWeak") + rv := reflect.ValueOf(vs.Get(i)) + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Path"), "Path"}, + {rv.MethodByName("Package"), "Package"}, + {rv.MethodByName("IsPublic"), "IsPublic"}, + {rv.MethodByName("IsWeak"), "IsWeak"}, + }...) ss = append(ss, "{"+rs.Join()+"}") } return start + joinStrings(ss, allowMulti) + end @@ -92,34 +98,26 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { for i := 0; i < vs.Len(); i++ { m := reflect.ValueOf(vs).MethodByName("Get") v := m.Call([]reflect.Value{reflect.ValueOf(i)})[0].Interface() - ss = append(ss, formatDescOpt(v.(protoreflect.Descriptor), false, allowMulti && !isEnumValue)) + ss = append(ss, formatDescOpt(v.(protoreflect.Descriptor), false, allowMulti && !isEnumValue, nil)) } return start + joinStrings(ss, allowMulti && isEnumValue) + end } } -// descriptorAccessors is a list of accessors to print for each descriptor. -// -// Do not print all accessors since some contain redundant information, -// while others are pointers that we do not want to follow since the descriptor -// is actually a cyclic graph. -// -// Using a list allows us to print the accessors in a sensible order. -var descriptorAccessors = map[reflect.Type][]string{ - reflect.TypeOf((*protoreflect.FileDescriptor)(nil)).Elem(): {"Path", "Package", "Imports", "Messages", "Enums", "Extensions", "Services"}, - reflect.TypeOf((*protoreflect.MessageDescriptor)(nil)).Elem(): {"IsMapEntry", "Fields", "Oneofs", "ReservedNames", "ReservedRanges", "RequiredNumbers", "ExtensionRanges", "Messages", "Enums", "Extensions"}, - reflect.TypeOf((*protoreflect.FieldDescriptor)(nil)).Elem(): {"Number", "Cardinality", "Kind", "HasJSONName", "JSONName", "HasPresence", "IsExtension", "IsPacked", "IsWeak", "IsList", "IsMap", "MapKey", "MapValue", "HasDefault", "Default", "ContainingOneof", "ContainingMessage", "Message", "Enum"}, - reflect.TypeOf((*protoreflect.OneofDescriptor)(nil)).Elem(): {"Fields"}, // not directly used; must keep in sync with formatDescOpt - reflect.TypeOf((*protoreflect.EnumDescriptor)(nil)).Elem(): {"Values", "ReservedNames", "ReservedRanges"}, - reflect.TypeOf((*protoreflect.EnumValueDescriptor)(nil)).Elem(): {"Number"}, - reflect.TypeOf((*protoreflect.ServiceDescriptor)(nil)).Elem(): {"Methods"}, - reflect.TypeOf((*protoreflect.MethodDescriptor)(nil)).Elem(): {"Input", "Output", "IsStreamingClient", "IsStreamingServer"}, +type methodAndName struct { + method reflect.Value + name string } func FormatDesc(s fmt.State, r rune, t protoreflect.Descriptor) { - io.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#')))) + io.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#')), nil)) } -func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool) string { + +func InternalFormatDescOptForTesting(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string { + return formatDescOpt(t, isRoot, allowMulti, record) +} + +func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string { rv := reflect.ValueOf(t) rt := rv.MethodByName("ProtoType").Type().In(0) @@ -129,26 +127,60 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool) string { } _, isFile := t.(protoreflect.FileDescriptor) - rs := records{allowMulti: allowMulti} + rs := records{ + allowMulti: allowMulti, + record: record, + } if t.IsPlaceholder() { if isFile { - rs.Append(rv, "Path", "Package", "IsPlaceholder") + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Path"), "Path"}, + {rv.MethodByName("Package"), "Package"}, + {rv.MethodByName("IsPlaceholder"), "IsPlaceholder"}, + }...) } else { - rs.Append(rv, "FullName", "IsPlaceholder") + rs.Append(rv, []methodAndName{ + {rv.MethodByName("FullName"), "FullName"}, + {rv.MethodByName("IsPlaceholder"), "IsPlaceholder"}, + }...) } } else { switch { case isFile: - rs.Append(rv, "Syntax") + rs.Append(rv, methodAndName{rv.MethodByName("Syntax"), "Syntax"}) case isRoot: - rs.Append(rv, "Syntax", "FullName") + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Syntax"), "Syntax"}, + {rv.MethodByName("FullName"), "FullName"}, + }...) default: - rs.Append(rv, "Name") + rs.Append(rv, methodAndName{rv.MethodByName("Name"), "Name"}) } switch t := t.(type) { case protoreflect.FieldDescriptor: - for _, s := range descriptorAccessors[rt] { - switch s { + accessors := []methodAndName{ + {rv.MethodByName("Number"), "Number"}, + {rv.MethodByName("Cardinality"), "Cardinality"}, + {rv.MethodByName("Kind"), "Kind"}, + {rv.MethodByName("HasJSONName"), "HasJSONName"}, + {rv.MethodByName("JSONName"), "JSONName"}, + {rv.MethodByName("HasPresence"), "HasPresence"}, + {rv.MethodByName("IsExtension"), "IsExtension"}, + {rv.MethodByName("IsPacked"), "IsPacked"}, + {rv.MethodByName("IsWeak"), "IsWeak"}, + {rv.MethodByName("IsList"), "IsList"}, + {rv.MethodByName("IsMap"), "IsMap"}, + {rv.MethodByName("MapKey"), "MapKey"}, + {rv.MethodByName("MapValue"), "MapValue"}, + {rv.MethodByName("HasDefault"), "HasDefault"}, + {rv.MethodByName("Default"), "Default"}, + {rv.MethodByName("ContainingOneof"), "ContainingOneof"}, + {rv.MethodByName("ContainingMessage"), "ContainingMessage"}, + {rv.MethodByName("Message"), "Message"}, + {rv.MethodByName("Enum"), "Enum"}, + } + for _, s := range accessors { + switch s.name { case "MapKey": if k := t.MapKey(); k != nil { rs.recs = append(rs.recs, [2]string{"MapKey", k.Kind().String()}) @@ -157,20 +189,20 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool) string { if v := t.MapValue(); v != nil { switch v.Kind() { case protoreflect.EnumKind: - rs.recs = append(rs.recs, [2]string{"MapValue", string(v.Enum().FullName())}) + rs.AppendRecs("MapValue", [2]string{"MapValue", string(v.Enum().FullName())}) case protoreflect.MessageKind, protoreflect.GroupKind: - rs.recs = append(rs.recs, [2]string{"MapValue", string(v.Message().FullName())}) + rs.AppendRecs("MapValue", [2]string{"MapValue", string(v.Message().FullName())}) default: - rs.recs = append(rs.recs, [2]string{"MapValue", v.Kind().String()}) + rs.AppendRecs("MapValue", [2]string{"MapValue", v.Kind().String()}) } } case "ContainingOneof": if od := t.ContainingOneof(); od != nil { - rs.recs = append(rs.recs, [2]string{"Oneof", string(od.Name())}) + rs.AppendRecs("ContainingOneof", [2]string{"Oneof", string(od.Name())}) } case "ContainingMessage": if t.IsExtension() { - rs.recs = append(rs.recs, [2]string{"Extendee", string(t.ContainingMessage().FullName())}) + rs.AppendRecs("ContainingMessage", [2]string{"Extendee", string(t.ContainingMessage().FullName())}) } case "Message": if !t.IsMap() { @@ -187,13 +219,61 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool) string { ss = append(ss, string(fs.Get(i).Name())) } if len(ss) > 0 { - rs.recs = append(rs.recs, [2]string{"Fields", "[" + joinStrings(ss, false) + "]"}) + rs.AppendRecs("Fields", [2]string{"Fields", "[" + joinStrings(ss, false) + "]"}) } - default: - rs.Append(rv, descriptorAccessors[rt]...) + + case protoreflect.FileDescriptor: + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Path"), "Path"}, + {rv.MethodByName("Package"), "Package"}, + {rv.MethodByName("Imports"), "Imports"}, + {rv.MethodByName("Messages"), "Messages"}, + {rv.MethodByName("Enums"), "Enums"}, + {rv.MethodByName("Extensions"), "Extensions"}, + {rv.MethodByName("Services"), "Services"}, + }...) + + case protoreflect.MessageDescriptor: + rs.Append(rv, []methodAndName{ + {rv.MethodByName("IsMapEntry"), "IsMapEntry"}, + {rv.MethodByName("Fields"), "Fields"}, + {rv.MethodByName("Oneofs"), "Oneofs"}, + {rv.MethodByName("ReservedNames"), "ReservedNames"}, + {rv.MethodByName("ReservedRanges"), "ReservedRanges"}, + {rv.MethodByName("RequiredNumbers"), "RequiredNumbers"}, + {rv.MethodByName("ExtensionRanges"), "ExtensionRanges"}, + {rv.MethodByName("Messages"), "Messages"}, + {rv.MethodByName("Enums"), "Enums"}, + {rv.MethodByName("Extensions"), "Extensions"}, + }...) + + case protoreflect.EnumDescriptor: + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Values"), "Values"}, + {rv.MethodByName("ReservedNames"), "ReservedNames"}, + {rv.MethodByName("ReservedRanges"), "ReservedRanges"}, + }...) + + case protoreflect.EnumValueDescriptor: + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Number"), "Number"}, + }...) + + case protoreflect.ServiceDescriptor: + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Methods"), "Methods"}, + }...) + + case protoreflect.MethodDescriptor: + rs.Append(rv, []methodAndName{ + {rv.MethodByName("Input"), "Input"}, + {rv.MethodByName("Output"), "Output"}, + {rv.MethodByName("IsStreamingClient"), "IsStreamingClient"}, + {rv.MethodByName("IsStreamingServer"), "IsStreamingServer"}, + }...) } - if rv.MethodByName("GoType").IsValid() { - rs.Append(rv, "GoType") + if m := rv.MethodByName("GoType"); m.IsValid() { + rs.Append(rv, methodAndName{m, "GoType"}) } } return start + rs.Join() + end @@ -202,19 +282,34 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool) string { type records struct { recs [][2]string allowMulti bool + + // record is a function that will be called for every Append() or + // AppendRecs() call, to be used for testing with the + // InternalFormatDescOptForTesting function. + record func(string) } -func (rs *records) Append(v reflect.Value, accessors ...string) { +func (rs *records) AppendRecs(fieldName string, newRecs [2]string) { + if rs.record != nil { + rs.record(fieldName) + } + rs.recs = append(rs.recs, newRecs) +} + +func (rs *records) Append(v reflect.Value, accessors ...methodAndName) { for _, a := range accessors { + if rs.record != nil { + rs.record(a.name) + } var rv reflect.Value - if m := v.MethodByName(a); m.IsValid() { - rv = m.Call(nil)[0] + if a.method.IsValid() { + rv = a.method.Call(nil)[0] } if v.Kind() == reflect.Struct && !rv.IsValid() { - rv = v.FieldByName(a) + rv = v.FieldByName(a.name) } if !rv.IsValid() { - panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a)) + panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a.name)) } if _, ok := rv.Interface().(protoreflect.Value); ok { rv = rv.MethodByName("Interface").Call(nil)[0] @@ -261,7 +356,7 @@ func (rs *records) Append(v reflect.Value, accessors ...string) { default: s = fmt.Sprint(v) } - rs.recs = append(rs.recs, [2]string{a, s}) + rs.recs = append(rs.recs, [2]string{a.name, s}) } } diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index 427c62d0..87853e78 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -412,12 +412,13 @@ func (d *Decoder) parseFieldName() (tok Token, err error) { // Field number. Identify if input is a valid number that is not negative // and is decimal integer within 32-bit range. if num := parseNumber(d.in); num.size > 0 { + str := num.string(d.in) if !num.neg && num.kind == numDec { - if _, err := strconv.ParseInt(string(d.in[:num.size]), 10, 32); err == nil { + if _, err := strconv.ParseInt(str, 10, 32); err == nil { return d.consumeToken(Name, num.size, uint8(FieldNumber)), nil } } - return Token{}, d.newSyntaxError("invalid field number: %s", d.in[:num.size]) + return Token{}, d.newSyntaxError("invalid field number: %s", str) } return Token{}, d.newSyntaxError("invalid field name: %s", errId(d.in)) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go index 81a5d8c8..45c81f02 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go @@ -15,17 +15,12 @@ func (d *Decoder) parseNumberValue() (Token, bool) { if num.neg { numAttrs |= isNegative } - strSize := num.size - last := num.size - 1 - if num.kind == numFloat && (d.in[last] == 'f' || d.in[last] == 'F') { - strSize = last - } tok := Token{ kind: Scalar, attrs: numberValue, pos: len(d.orig) - len(d.in), raw: d.in[:num.size], - str: string(d.in[:strSize]), + str: num.string(d.in), numAttrs: numAttrs, } d.consume(num.size) @@ -46,6 +41,27 @@ type number struct { kind uint8 neg bool size int + // if neg, this is the length of whitespace and comments between + // the minus sign and the rest fo the number literal + sep int +} + +func (num number) string(data []byte) string { + strSize := num.size + last := num.size - 1 + if num.kind == numFloat && (data[last] == 'f' || data[last] == 'F') { + strSize = last + } + if num.neg && num.sep > 0 { + // strip whitespace/comments between negative sign and the rest + strLen := strSize - num.sep + str := make([]byte, strLen) + str[0] = data[0] + copy(str[1:], data[num.sep+1:strSize]) + return string(str) + } + return string(data[:strSize]) + } // parseNumber constructs a number object from given input. It allows for the @@ -67,19 +83,22 @@ func parseNumber(input []byte) number { } // Optional - + var sep int if s[0] == '-' { neg = true s = s[1:] size++ + // Consume any whitespace or comments between the + // negative sign and the rest of the number + lenBefore := len(s) + s = consume(s, 0) + sep = lenBefore - len(s) + size += sep if len(s) == 0 { return number{} } } - // C++ allows for whitespace and comments in between the negative sign and - // the rest of the number. This logic currently does not but is consistent - // with v1. - switch { case s[0] == '0': if len(s) > 1 { @@ -116,7 +135,7 @@ func parseNumber(input []byte) number { if len(s) > 0 && !isDelim(s[0]) { return number{} } - return number{kind: kind, neg: neg, size: size} + return number{kind: kind, neg: neg, size: size, sep: sep} } } s = s[1:] @@ -188,5 +207,5 @@ func parseNumber(input []byte) number { return number{} } - return number{kind: kind, neg: neg, size: size} + return number{kind: kind, neg: neg, size: size, sep: sep} } diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go index da289ccc..cf7aed77 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go @@ -53,8 +53,10 @@ type encoderState struct { // If outputASCII is true, strings will be serialized in such a way that // multi-byte UTF-8 sequences are escaped. This property ensures that the // overall output is ASCII (as opposed to UTF-8). -func NewEncoder(indent string, delims [2]byte, outputASCII bool) (*Encoder, error) { - e := &Encoder{} +func NewEncoder(buf []byte, indent string, delims [2]byte, outputASCII bool) (*Encoder, error) { + e := &Encoder{ + encoderState: encoderState{out: buf}, + } if len(indent) > 0 { if strings.Trim(indent, " \t") != "" { return nil, errors.New("indent may only be composed of space and tab characters") @@ -195,13 +197,13 @@ func appendFloat(out []byte, n float64, bitSize int) []byte { // WriteInt writes out the given signed integer value. func (e *Encoder) WriteInt(n int64) { e.prepareNext(scalar) - e.out = append(e.out, strconv.FormatInt(n, 10)...) + e.out = strconv.AppendInt(e.out, n, 10) } // WriteUint writes out the given unsigned integer value. func (e *Encoder) WriteUint(n uint64) { e.prepareNext(scalar) - e.out = append(e.out, strconv.FormatUint(n, 10)...) + e.out = strconv.AppendUint(e.out, n, 10) } // WriteLiteral writes out the given string as a literal value without quotes. diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index 7c3689ba..193c68e8 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -21,11 +21,26 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" ) +// Edition is an Enum for proto2.Edition +type Edition int32 + +// These values align with the value of Enum in descriptor.proto which allows +// direct conversion between the proto enum and this enum. +const ( + EditionUnknown Edition = 0 + EditionProto2 Edition = 998 + EditionProto3 Edition = 999 + Edition2023 Edition = 1000 + EditionUnsupported Edition = 100000 +) + // The types in this file may have a suffix: // • L0: Contains fields common to all descriptors (except File) and // must be initialized up front. // • L1: Contains fields specific to a descriptor and -// must be initialized up front. +// must be initialized up front. If the associated proto uses Editions, the +// Editions features must always be resolved. If not explicitly set, the +// appropriate default must be resolved and set. // • L2: Contains fields that are lazily initialized when constructing // from the raw file descriptor. When constructing as a literal, the L2 // fields must be initialized up front. @@ -44,6 +59,7 @@ type ( } FileL1 struct { Syntax protoreflect.Syntax + Edition Edition // Only used if Syntax == Editions Path string Package protoreflect.FullName @@ -51,12 +67,35 @@ type ( Messages Messages Extensions Extensions Services Services + + EditionFeatures FileEditionFeatures } FileL2 struct { Options func() protoreflect.ProtoMessage Imports FileImports Locations SourceLocations } + + FileEditionFeatures struct { + // IsFieldPresence is true if field_presence is EXPLICIT + // https://protobuf.dev/editions/features/#field_presence + IsFieldPresence bool + // IsOpenEnum is true if enum_type is OPEN + // https://protobuf.dev/editions/features/#enum_type + IsOpenEnum bool + // IsPacked is true if repeated_field_encoding is PACKED + // https://protobuf.dev/editions/features/#repeated_field_encoding + IsPacked bool + // IsUTF8Validated is true if utf_validation is VERIFY + // https://protobuf.dev/editions/features/#utf8_validation + IsUTF8Validated bool + // IsDelimitedEncoded is true if message_encoding is DELIMITED + // https://protobuf.dev/editions/features/#message_encoding + IsDelimitedEncoded bool + // IsJSONCompliant is true if json_format is ALLOW + // https://protobuf.dev/editions/features/#json_format + IsJSONCompliant bool + } ) func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd } @@ -210,6 +249,9 @@ type ( ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields Enum protoreflect.EnumDescriptor Message protoreflect.MessageDescriptor + + // Edition features. + Presence bool } Oneof struct { @@ -273,6 +315,9 @@ func (fd *Field) HasJSONName() bool { return fd.L1.StringNam func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) } func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) } func (fd *Field) HasPresence() bool { + if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { + return fd.L1.Presence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil + } return fd.L1.Cardinality != protoreflect.Repeated && (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 || fd.L1.Message != nil || fd.L1.ContainingOneof != nil) } func (fd *Field) HasOptionalKeyword() bool { diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index e3cdf1c2..8f94230e 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -12,6 +12,12 @@ import ( const File_google_protobuf_descriptor_proto = "google/protobuf/descriptor.proto" +// Full and short names for google.protobuf.Edition. +const ( + Edition_enum_fullname = "google.protobuf.Edition" + Edition_enum_name = "Edition" +) + // Names for google.protobuf.FileDescriptorSet. const ( FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet" @@ -50,6 +56,7 @@ const ( FileDescriptorProto_Options_field_name protoreflect.Name = "options" FileDescriptorProto_SourceCodeInfo_field_name protoreflect.Name = "source_code_info" FileDescriptorProto_Syntax_field_name protoreflect.Name = "syntax" + FileDescriptorProto_Edition_field_name protoreflect.Name = "edition" FileDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.name" FileDescriptorProto_Package_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.package" @@ -63,6 +70,7 @@ const ( FileDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.options" FileDescriptorProto_SourceCodeInfo_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.source_code_info" FileDescriptorProto_Syntax_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.syntax" + FileDescriptorProto_Edition_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.edition" ) // Field numbers for google.protobuf.FileDescriptorProto. @@ -79,6 +87,7 @@ const ( FileDescriptorProto_Options_field_number protoreflect.FieldNumber = 8 FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumber = 9 FileDescriptorProto_Syntax_field_number protoreflect.FieldNumber = 12 + FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 14 ) // Names for google.protobuf.DescriptorProto. @@ -180,13 +189,58 @@ const ( // Field names for google.protobuf.ExtensionRangeOptions. const ( ExtensionRangeOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + ExtensionRangeOptions_Declaration_field_name protoreflect.Name = "declaration" + ExtensionRangeOptions_Features_field_name protoreflect.Name = "features" + ExtensionRangeOptions_Verification_field_name protoreflect.Name = "verification" ExtensionRangeOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.uninterpreted_option" + ExtensionRangeOptions_Declaration_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.declaration" + ExtensionRangeOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.features" + ExtensionRangeOptions_Verification_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.verification" ) // Field numbers for google.protobuf.ExtensionRangeOptions. const ( ExtensionRangeOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + ExtensionRangeOptions_Declaration_field_number protoreflect.FieldNumber = 2 + ExtensionRangeOptions_Features_field_number protoreflect.FieldNumber = 50 + ExtensionRangeOptions_Verification_field_number protoreflect.FieldNumber = 3 +) + +// Full and short names for google.protobuf.ExtensionRangeOptions.VerificationState. +const ( + ExtensionRangeOptions_VerificationState_enum_fullname = "google.protobuf.ExtensionRangeOptions.VerificationState" + ExtensionRangeOptions_VerificationState_enum_name = "VerificationState" +) + +// Names for google.protobuf.ExtensionRangeOptions.Declaration. +const ( + ExtensionRangeOptions_Declaration_message_name protoreflect.Name = "Declaration" + ExtensionRangeOptions_Declaration_message_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration" +) + +// Field names for google.protobuf.ExtensionRangeOptions.Declaration. +const ( + ExtensionRangeOptions_Declaration_Number_field_name protoreflect.Name = "number" + ExtensionRangeOptions_Declaration_FullName_field_name protoreflect.Name = "full_name" + ExtensionRangeOptions_Declaration_Type_field_name protoreflect.Name = "type" + ExtensionRangeOptions_Declaration_Reserved_field_name protoreflect.Name = "reserved" + ExtensionRangeOptions_Declaration_Repeated_field_name protoreflect.Name = "repeated" + + ExtensionRangeOptions_Declaration_Number_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.number" + ExtensionRangeOptions_Declaration_FullName_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.full_name" + ExtensionRangeOptions_Declaration_Type_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.type" + ExtensionRangeOptions_Declaration_Reserved_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.reserved" + ExtensionRangeOptions_Declaration_Repeated_field_fullname protoreflect.FullName = "google.protobuf.ExtensionRangeOptions.Declaration.repeated" +) + +// Field numbers for google.protobuf.ExtensionRangeOptions.Declaration. +const ( + ExtensionRangeOptions_Declaration_Number_field_number protoreflect.FieldNumber = 1 + ExtensionRangeOptions_Declaration_FullName_field_number protoreflect.FieldNumber = 2 + ExtensionRangeOptions_Declaration_Type_field_number protoreflect.FieldNumber = 3 + ExtensionRangeOptions_Declaration_Reserved_field_number protoreflect.FieldNumber = 5 + ExtensionRangeOptions_Declaration_Repeated_field_number protoreflect.FieldNumber = 6 ) // Names for google.protobuf.FieldDescriptorProto. @@ -430,6 +484,7 @@ const ( FileOptions_PhpNamespace_field_name protoreflect.Name = "php_namespace" FileOptions_PhpMetadataNamespace_field_name protoreflect.Name = "php_metadata_namespace" FileOptions_RubyPackage_field_name protoreflect.Name = "ruby_package" + FileOptions_Features_field_name protoreflect.Name = "features" FileOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" FileOptions_JavaPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_package" @@ -452,6 +507,7 @@ const ( FileOptions_PhpNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_namespace" FileOptions_PhpMetadataNamespace_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_metadata_namespace" FileOptions_RubyPackage_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.ruby_package" + FileOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.features" FileOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.uninterpreted_option" ) @@ -477,6 +533,7 @@ const ( FileOptions_PhpNamespace_field_number protoreflect.FieldNumber = 41 FileOptions_PhpMetadataNamespace_field_number protoreflect.FieldNumber = 44 FileOptions_RubyPackage_field_number protoreflect.FieldNumber = 45 + FileOptions_Features_field_number protoreflect.FieldNumber = 50 FileOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -494,26 +551,32 @@ const ( // Field names for google.protobuf.MessageOptions. const ( - MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format" - MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor" - MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated" - MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry" - MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format" + MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor" + MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated" + MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry" + MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts" + MessageOptions_Features_field_name protoreflect.Name = "features" + MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format" - MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor" - MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated" - MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry" - MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option" + MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format" + MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor" + MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated" + MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry" + MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts" + MessageOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.features" + MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option" ) // Field numbers for google.protobuf.MessageOptions. const ( - MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1 - MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2 - MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7 - MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1 + MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2 + MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3 + MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7 + MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11 + MessageOptions_Features_field_number protoreflect.FieldNumber = 12 + MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) // Names for google.protobuf.FieldOptions. @@ -528,16 +591,28 @@ const ( FieldOptions_Packed_field_name protoreflect.Name = "packed" FieldOptions_Jstype_field_name protoreflect.Name = "jstype" FieldOptions_Lazy_field_name protoreflect.Name = "lazy" + FieldOptions_UnverifiedLazy_field_name protoreflect.Name = "unverified_lazy" FieldOptions_Deprecated_field_name protoreflect.Name = "deprecated" FieldOptions_Weak_field_name protoreflect.Name = "weak" + FieldOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" + FieldOptions_Retention_field_name protoreflect.Name = "retention" + FieldOptions_Targets_field_name protoreflect.Name = "targets" + FieldOptions_EditionDefaults_field_name protoreflect.Name = "edition_defaults" + FieldOptions_Features_field_name protoreflect.Name = "features" FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype" FieldOptions_Packed_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.packed" FieldOptions_Jstype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.jstype" FieldOptions_Lazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.lazy" + FieldOptions_UnverifiedLazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.unverified_lazy" FieldOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.deprecated" FieldOptions_Weak_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.weak" + FieldOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.debug_redact" + FieldOptions_Retention_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.retention" + FieldOptions_Targets_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.targets" + FieldOptions_EditionDefaults_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.edition_defaults" + FieldOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.features" FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option" ) @@ -547,8 +622,14 @@ const ( FieldOptions_Packed_field_number protoreflect.FieldNumber = 2 FieldOptions_Jstype_field_number protoreflect.FieldNumber = 6 FieldOptions_Lazy_field_number protoreflect.FieldNumber = 5 + FieldOptions_UnverifiedLazy_field_number protoreflect.FieldNumber = 15 FieldOptions_Deprecated_field_number protoreflect.FieldNumber = 3 FieldOptions_Weak_field_number protoreflect.FieldNumber = 10 + FieldOptions_DebugRedact_field_number protoreflect.FieldNumber = 16 + FieldOptions_Retention_field_number protoreflect.FieldNumber = 17 + FieldOptions_Targets_field_number protoreflect.FieldNumber = 19 + FieldOptions_EditionDefaults_field_number protoreflect.FieldNumber = 20 + FieldOptions_Features_field_number protoreflect.FieldNumber = 21 FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -564,6 +645,39 @@ const ( FieldOptions_JSType_enum_name = "JSType" ) +// Full and short names for google.protobuf.FieldOptions.OptionRetention. +const ( + FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention" + FieldOptions_OptionRetention_enum_name = "OptionRetention" +) + +// Full and short names for google.protobuf.FieldOptions.OptionTargetType. +const ( + FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType" + FieldOptions_OptionTargetType_enum_name = "OptionTargetType" +) + +// Names for google.protobuf.FieldOptions.EditionDefault. +const ( + FieldOptions_EditionDefault_message_name protoreflect.Name = "EditionDefault" + FieldOptions_EditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault" +) + +// Field names for google.protobuf.FieldOptions.EditionDefault. +const ( + FieldOptions_EditionDefault_Edition_field_name protoreflect.Name = "edition" + FieldOptions_EditionDefault_Value_field_name protoreflect.Name = "value" + + FieldOptions_EditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.edition" + FieldOptions_EditionDefault_Value_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.EditionDefault.value" +) + +// Field numbers for google.protobuf.FieldOptions.EditionDefault. +const ( + FieldOptions_EditionDefault_Edition_field_number protoreflect.FieldNumber = 3 + FieldOptions_EditionDefault_Value_field_number protoreflect.FieldNumber = 2 +) + // Names for google.protobuf.OneofOptions. const ( OneofOptions_message_name protoreflect.Name = "OneofOptions" @@ -572,13 +686,16 @@ const ( // Field names for google.protobuf.OneofOptions. const ( + OneofOptions_Features_field_name protoreflect.Name = "features" OneofOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + OneofOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.features" OneofOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.OneofOptions.uninterpreted_option" ) // Field numbers for google.protobuf.OneofOptions. const ( + OneofOptions_Features_field_number protoreflect.FieldNumber = 1 OneofOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -590,20 +707,26 @@ const ( // Field names for google.protobuf.EnumOptions. const ( - EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias" - EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated" - EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias" + EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated" + EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts" + EnumOptions_Features_field_name protoreflect.Name = "features" + EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias" - EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated" - EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option" + EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias" + EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated" + EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts" + EnumOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.features" + EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option" ) // Field numbers for google.protobuf.EnumOptions. const ( - EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2 - EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2 + EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3 + EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6 + EnumOptions_Features_field_number protoreflect.FieldNumber = 7 + EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) // Names for google.protobuf.EnumValueOptions. @@ -615,15 +738,21 @@ const ( // Field names for google.protobuf.EnumValueOptions. const ( EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" + EnumValueOptions_Features_field_name protoreflect.Name = "features" + EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" + EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" + EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" ) // Field numbers for google.protobuf.EnumValueOptions. const ( EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 + EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 + EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -635,15 +764,18 @@ const ( // Field names for google.protobuf.ServiceOptions. const ( + ServiceOptions_Features_field_name protoreflect.Name = "features" ServiceOptions_Deprecated_field_name protoreflect.Name = "deprecated" ServiceOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + ServiceOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.features" ServiceOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.deprecated" ServiceOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.ServiceOptions.uninterpreted_option" ) // Field numbers for google.protobuf.ServiceOptions. const ( + ServiceOptions_Features_field_number protoreflect.FieldNumber = 34 ServiceOptions_Deprecated_field_number protoreflect.FieldNumber = 33 ServiceOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -658,10 +790,12 @@ const ( const ( MethodOptions_Deprecated_field_name protoreflect.Name = "deprecated" MethodOptions_IdempotencyLevel_field_name protoreflect.Name = "idempotency_level" + MethodOptions_Features_field_name protoreflect.Name = "features" MethodOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" MethodOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.deprecated" MethodOptions_IdempotencyLevel_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.idempotency_level" + MethodOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.features" MethodOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MethodOptions.uninterpreted_option" ) @@ -669,6 +803,7 @@ const ( const ( MethodOptions_Deprecated_field_number protoreflect.FieldNumber = 33 MethodOptions_IdempotencyLevel_field_number protoreflect.FieldNumber = 34 + MethodOptions_Features_field_number protoreflect.FieldNumber = 35 MethodOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -735,6 +870,120 @@ const ( UninterpretedOption_NamePart_IsExtension_field_number protoreflect.FieldNumber = 2 ) +// Names for google.protobuf.FeatureSet. +const ( + FeatureSet_message_name protoreflect.Name = "FeatureSet" + FeatureSet_message_fullname protoreflect.FullName = "google.protobuf.FeatureSet" +) + +// Field names for google.protobuf.FeatureSet. +const ( + FeatureSet_FieldPresence_field_name protoreflect.Name = "field_presence" + FeatureSet_EnumType_field_name protoreflect.Name = "enum_type" + FeatureSet_RepeatedFieldEncoding_field_name protoreflect.Name = "repeated_field_encoding" + FeatureSet_Utf8Validation_field_name protoreflect.Name = "utf8_validation" + FeatureSet_MessageEncoding_field_name protoreflect.Name = "message_encoding" + FeatureSet_JsonFormat_field_name protoreflect.Name = "json_format" + + FeatureSet_FieldPresence_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.field_presence" + FeatureSet_EnumType_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.enum_type" + FeatureSet_RepeatedFieldEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.repeated_field_encoding" + FeatureSet_Utf8Validation_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.utf8_validation" + FeatureSet_MessageEncoding_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.message_encoding" + FeatureSet_JsonFormat_field_fullname protoreflect.FullName = "google.protobuf.FeatureSet.json_format" +) + +// Field numbers for google.protobuf.FeatureSet. +const ( + FeatureSet_FieldPresence_field_number protoreflect.FieldNumber = 1 + FeatureSet_EnumType_field_number protoreflect.FieldNumber = 2 + FeatureSet_RepeatedFieldEncoding_field_number protoreflect.FieldNumber = 3 + FeatureSet_Utf8Validation_field_number protoreflect.FieldNumber = 4 + FeatureSet_MessageEncoding_field_number protoreflect.FieldNumber = 5 + FeatureSet_JsonFormat_field_number protoreflect.FieldNumber = 6 +) + +// Full and short names for google.protobuf.FeatureSet.FieldPresence. +const ( + FeatureSet_FieldPresence_enum_fullname = "google.protobuf.FeatureSet.FieldPresence" + FeatureSet_FieldPresence_enum_name = "FieldPresence" +) + +// Full and short names for google.protobuf.FeatureSet.EnumType. +const ( + FeatureSet_EnumType_enum_fullname = "google.protobuf.FeatureSet.EnumType" + FeatureSet_EnumType_enum_name = "EnumType" +) + +// Full and short names for google.protobuf.FeatureSet.RepeatedFieldEncoding. +const ( + FeatureSet_RepeatedFieldEncoding_enum_fullname = "google.protobuf.FeatureSet.RepeatedFieldEncoding" + FeatureSet_RepeatedFieldEncoding_enum_name = "RepeatedFieldEncoding" +) + +// Full and short names for google.protobuf.FeatureSet.Utf8Validation. +const ( + FeatureSet_Utf8Validation_enum_fullname = "google.protobuf.FeatureSet.Utf8Validation" + FeatureSet_Utf8Validation_enum_name = "Utf8Validation" +) + +// Full and short names for google.protobuf.FeatureSet.MessageEncoding. +const ( + FeatureSet_MessageEncoding_enum_fullname = "google.protobuf.FeatureSet.MessageEncoding" + FeatureSet_MessageEncoding_enum_name = "MessageEncoding" +) + +// Full and short names for google.protobuf.FeatureSet.JsonFormat. +const ( + FeatureSet_JsonFormat_enum_fullname = "google.protobuf.FeatureSet.JsonFormat" + FeatureSet_JsonFormat_enum_name = "JsonFormat" +) + +// Names for google.protobuf.FeatureSetDefaults. +const ( + FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults" + FeatureSetDefaults_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults" +) + +// Field names for google.protobuf.FeatureSetDefaults. +const ( + FeatureSetDefaults_Defaults_field_name protoreflect.Name = "defaults" + FeatureSetDefaults_MinimumEdition_field_name protoreflect.Name = "minimum_edition" + FeatureSetDefaults_MaximumEdition_field_name protoreflect.Name = "maximum_edition" + + FeatureSetDefaults_Defaults_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.defaults" + FeatureSetDefaults_MinimumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.minimum_edition" + FeatureSetDefaults_MaximumEdition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.maximum_edition" +) + +// Field numbers for google.protobuf.FeatureSetDefaults. +const ( + FeatureSetDefaults_Defaults_field_number protoreflect.FieldNumber = 1 + FeatureSetDefaults_MinimumEdition_field_number protoreflect.FieldNumber = 4 + FeatureSetDefaults_MaximumEdition_field_number protoreflect.FieldNumber = 5 +) + +// Names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. +const ( + FeatureSetDefaults_FeatureSetEditionDefault_message_name protoreflect.Name = "FeatureSetEditionDefault" + FeatureSetDefaults_FeatureSetEditionDefault_message_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" +) + +// Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. +const ( + FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition" + FeatureSetDefaults_FeatureSetEditionDefault_Features_field_name protoreflect.Name = "features" + + FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition" + FeatureSetDefaults_FeatureSetEditionDefault_Features_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features" +) + +// Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. +const ( + FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3 + FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number protoreflect.FieldNumber = 2 +) + // Names for google.protobuf.SourceCodeInfo. const ( SourceCodeInfo_message_name protoreflect.Name = "SourceCodeInfo" @@ -813,11 +1062,13 @@ const ( GeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = "source_file" GeneratedCodeInfo_Annotation_Begin_field_name protoreflect.Name = "begin" GeneratedCodeInfo_Annotation_End_field_name protoreflect.Name = "end" + GeneratedCodeInfo_Annotation_Semantic_field_name protoreflect.Name = "semantic" GeneratedCodeInfo_Annotation_Path_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.path" GeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.source_file" GeneratedCodeInfo_Annotation_Begin_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.begin" GeneratedCodeInfo_Annotation_End_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.end" + GeneratedCodeInfo_Annotation_Semantic_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.semantic" ) // Field numbers for google.protobuf.GeneratedCodeInfo.Annotation. @@ -826,4 +1077,11 @@ const ( GeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldNumber = 2 GeneratedCodeInfo_Annotation_Begin_field_number protoreflect.FieldNumber = 3 GeneratedCodeInfo_Annotation_End_field_number protoreflect.FieldNumber = 4 + GeneratedCodeInfo_Annotation_Semantic_field_number protoreflect.FieldNumber = 5 +) + +// Full and short names for google.protobuf.GeneratedCodeInfo.Annotation.Semantic. +const ( + GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic" + GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic" ) diff --git a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go index 3bc71013..e0f75fea 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go @@ -32,6 +32,7 @@ const ( Type_Options_field_name protoreflect.Name = "options" Type_SourceContext_field_name protoreflect.Name = "source_context" Type_Syntax_field_name protoreflect.Name = "syntax" + Type_Edition_field_name protoreflect.Name = "edition" Type_Name_field_fullname protoreflect.FullName = "google.protobuf.Type.name" Type_Fields_field_fullname protoreflect.FullName = "google.protobuf.Type.fields" @@ -39,6 +40,7 @@ const ( Type_Options_field_fullname protoreflect.FullName = "google.protobuf.Type.options" Type_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Type.source_context" Type_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Type.syntax" + Type_Edition_field_fullname protoreflect.FullName = "google.protobuf.Type.edition" ) // Field numbers for google.protobuf.Type. @@ -49,6 +51,7 @@ const ( Type_Options_field_number protoreflect.FieldNumber = 4 Type_SourceContext_field_number protoreflect.FieldNumber = 5 Type_Syntax_field_number protoreflect.FieldNumber = 6 + Type_Edition_field_number protoreflect.FieldNumber = 7 ) // Names for google.protobuf.Field. @@ -121,12 +124,14 @@ const ( Enum_Options_field_name protoreflect.Name = "options" Enum_SourceContext_field_name protoreflect.Name = "source_context" Enum_Syntax_field_name protoreflect.Name = "syntax" + Enum_Edition_field_name protoreflect.Name = "edition" Enum_Name_field_fullname protoreflect.FullName = "google.protobuf.Enum.name" Enum_Enumvalue_field_fullname protoreflect.FullName = "google.protobuf.Enum.enumvalue" Enum_Options_field_fullname protoreflect.FullName = "google.protobuf.Enum.options" Enum_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Enum.source_context" Enum_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Enum.syntax" + Enum_Edition_field_fullname protoreflect.FullName = "google.protobuf.Enum.edition" ) // Field numbers for google.protobuf.Enum. @@ -136,6 +141,7 @@ const ( Enum_Options_field_number protoreflect.FieldNumber = 3 Enum_SourceContext_field_number protoreflect.FieldNumber = 4 Enum_Syntax_field_number protoreflect.FieldNumber = 5 + Enum_Edition_field_number protoreflect.FieldNumber = 6 ) // Names for google.protobuf.EnumValue. diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go b/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go index 1a509b63..f55dc01e 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go @@ -162,11 +162,20 @@ func appendBoolSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions func consumeBoolSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.BoolSlice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growBoolSlice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -732,11 +741,20 @@ func appendInt32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOption func consumeInt32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Int32Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growInt32Slice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -1138,11 +1156,20 @@ func appendSint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio func consumeSint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Int32Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growInt32Slice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -1544,11 +1571,20 @@ func appendUint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio func consumeUint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Uint32Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growUint32Slice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -1950,11 +1986,20 @@ func appendInt64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOption func consumeInt64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Int64Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growInt64Slice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -2356,11 +2401,20 @@ func appendSint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio func consumeSint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Int64Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growInt64Slice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -2762,11 +2816,20 @@ func appendUint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio func consumeUint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Uint64Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := 0 + for _, v := range b { + if v < 0x80 { + count++ + } + } + if count > 0 { + p.growUint64Slice(count) + } + s := *sp for len(b) > 0 { var v uint64 var n int @@ -3145,11 +3208,15 @@ func appendSfixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpt func consumeSfixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Int32Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := len(b) / protowire.SizeFixed32() + if count > 0 { + p.growInt32Slice(count) + } + s := *sp for len(b) > 0 { v, n := protowire.ConsumeFixed32(b) if n < 0 { @@ -3461,11 +3528,15 @@ func appendFixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpti func consumeFixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Uint32Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := len(b) / protowire.SizeFixed32() + if count > 0 { + p.growUint32Slice(count) + } + s := *sp for len(b) > 0 { v, n := protowire.ConsumeFixed32(b) if n < 0 { @@ -3777,11 +3848,15 @@ func appendFloatSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOption func consumeFloatSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Float32Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := len(b) / protowire.SizeFixed32() + if count > 0 { + p.growFloat32Slice(count) + } + s := *sp for len(b) > 0 { v, n := protowire.ConsumeFixed32(b) if n < 0 { @@ -4093,11 +4168,15 @@ func appendSfixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpt func consumeSfixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Int64Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := len(b) / protowire.SizeFixed64() + if count > 0 { + p.growInt64Slice(count) + } + s := *sp for len(b) > 0 { v, n := protowire.ConsumeFixed64(b) if n < 0 { @@ -4409,11 +4488,15 @@ func appendFixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOpti func consumeFixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Uint64Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := len(b) / protowire.SizeFixed64() + if count > 0 { + p.growUint64Slice(count) + } + s := *sp for len(b) > 0 { v, n := protowire.ConsumeFixed64(b) if n < 0 { @@ -4725,11 +4808,15 @@ func appendDoubleSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptio func consumeDoubleSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { sp := p.Float64Slice() if wtyp == protowire.BytesType { - s := *sp b, n := protowire.ConsumeBytes(b) if n < 0 { return out, errDecode } + count := len(b) / protowire.SizeFixed64() + if count > 0 { + p.growFloat64Slice(count) + } + s := *sp for len(b) > 0 { v, n := protowire.ConsumeFixed64(b) if n < 0 { diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go index 11a6128b..185ef2ef 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go @@ -59,7 +59,6 @@ func NewConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { default: return newSingularConverter(t, fd) } - panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) } var ( diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 61c483fa..2ab2c629 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -206,13 +206,18 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName // Obtain a list of oneof wrapper types. var oneofWrappers []reflect.Type - for _, method := range []string{"XXX_OneofFuncs", "XXX_OneofWrappers"} { - if fn, ok := t.MethodByName(method); ok { - for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { - for _, v := range vs { - oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) - } + methods := make([]reflect.Method, 0, 2) + if m, ok := t.MethodByName("XXX_OneofFuncs"); ok { + methods = append(methods, m) + } + if m, ok := t.MethodByName("XXX_OneofWrappers"); ok { + methods = append(methods, m) + } + for _, fn := range methods { + for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { + if vs, ok := v.Interface().([]interface{}); ok { + for _, v := range vs { + oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) } } } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index 4f5fb67a..629bacdc 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -192,12 +192,17 @@ fieldLoop: // Derive a mapping of oneof wrappers to fields. oneofWrappers := mi.OneofWrappers - for _, method := range []string{"XXX_OneofFuncs", "XXX_OneofWrappers"} { - if fn, ok := reflect.PtrTo(t).MethodByName(method); ok { - for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { - oneofWrappers = vs - } + methods := make([]reflect.Method, 0, 2) + if m, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok { + methods = append(methods, m) + } + if m, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok { + methods = append(methods, m) + } + for _, fn := range methods { + for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { + if vs, ok := v.Interface().([]interface{}); ok { + oneofWrappers = vs } } } diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go index 4c491bdf..517e9443 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go @@ -159,6 +159,42 @@ func (p pointer) SetPointer(v pointer) { p.v.Elem().Set(v.v) } +func growSlice(p pointer, addCap int) { + // TODO: Once we only support Go 1.20 and newer, use reflect.Grow. + in := p.v.Elem() + out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap) + reflect.Copy(out, in) + p.v.Elem().Set(out) +} + +func (p pointer) growBoolSlice(addCap int) { + growSlice(p, addCap) +} + +func (p pointer) growInt32Slice(addCap int) { + growSlice(p, addCap) +} + +func (p pointer) growUint32Slice(addCap int) { + growSlice(p, addCap) +} + +func (p pointer) growInt64Slice(addCap int) { + growSlice(p, addCap) +} + +func (p pointer) growUint64Slice(addCap int) { + growSlice(p, addCap) +} + +func (p pointer) growFloat64Slice(addCap int) { + growSlice(p, addCap) +} + +func (p pointer) growFloat32Slice(addCap int) { + growSlice(p, addCap) +} + func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") } func (ms *messageState) pointer() pointer { panic("not supported") } func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") } diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index ee0e0573..4b020e31 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -138,6 +138,46 @@ func (p pointer) SetPointer(v pointer) { *(*unsafe.Pointer)(p.p) = (unsafe.Pointer)(v.p) } +func (p pointer) growBoolSlice(addCap int) { + sp := p.BoolSlice() + s := make([]bool, 0, addCap+len(*sp)) + s = s[:len(*sp)] + copy(s, *sp) + *sp = s +} + +func (p pointer) growInt32Slice(addCap int) { + sp := p.Int32Slice() + s := make([]int32, 0, addCap+len(*sp)) + s = s[:len(*sp)] + copy(s, *sp) + *sp = s +} + +func (p pointer) growUint32Slice(addCap int) { + p.growInt32Slice(addCap) +} + +func (p pointer) growFloat32Slice(addCap int) { + p.growInt32Slice(addCap) +} + +func (p pointer) growInt64Slice(addCap int) { + sp := p.Int64Slice() + s := make([]int64, 0, addCap+len(*sp)) + s = s[:len(*sp)] + copy(s, *sp) + *sp = s +} + +func (p pointer) growUint64Slice(addCap int) { + p.growInt64Slice(addCap) +} + +func (p pointer) growFloat64Slice(addCap int) { + p.growInt64Slice(addCap) +} + // Static check that MessageState does not exceed the size of a pointer. const _ = uint(unsafe.Sizeof(unsafe.Pointer(nil)) - unsafe.Sizeof(MessageState{})) diff --git a/vendor/google.golang.org/protobuf/internal/order/order.go b/vendor/google.golang.org/protobuf/internal/order/order.go index 33745ed0..dea522e1 100644 --- a/vendor/google.golang.org/protobuf/internal/order/order.go +++ b/vendor/google.golang.org/protobuf/internal/order/order.go @@ -33,7 +33,7 @@ var ( return !inOneof(ox) && inOneof(oy) } // Fields in disjoint oneof sets are sorted by declaration index. - if ox != nil && oy != nil && ox != oy { + if inOneof(ox) && inOneof(oy) && ox != oy { return ox.Index() < oy.Index() } // Fields sorted by field number. diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go similarity index 95% rename from vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go rename to vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go index fea589c4..a008acd0 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine -// +build !purego,!appengine +//go:build !purego && !appengine && !go1.21 +// +build !purego,!appengine,!go1.21 package strs @@ -87,7 +87,7 @@ func (sb *Builder) grow(n int) { // Unlike strings.Builder, we do not need to copy over the contents // of the old buffer since our builder provides no API for // retrieving previously created strings. - sb.buf = make([]byte, 2*(cap(sb.buf)+n)) + sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n)) } func (sb *Builder) last(n int) string { diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go new file mode 100644 index 00000000..60166f2b --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go @@ -0,0 +1,74 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !purego && !appengine && go1.21 +// +build !purego,!appengine,go1.21 + +package strs + +import ( + "unsafe" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +// UnsafeString returns an unsafe string reference of b. +// The caller must treat the input slice as immutable. +// +// WARNING: Use carefully. The returned result must not leak to the end user +// unless the input slice is provably immutable. +func UnsafeString(b []byte) string { + return unsafe.String(unsafe.SliceData(b), len(b)) +} + +// UnsafeBytes returns an unsafe bytes slice reference of s. +// The caller must treat returned slice as immutable. +// +// WARNING: Use carefully. The returned result must not leak to the end user. +func UnsafeBytes(s string) []byte { + return unsafe.Slice(unsafe.StringData(s), len(s)) +} + +// Builder builds a set of strings with shared lifetime. +// This differs from strings.Builder, which is for building a single string. +type Builder struct { + buf []byte +} + +// AppendFullName is equivalent to protoreflect.FullName.Append, +// but optimized for large batches where each name has a shared lifetime. +func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName { + n := len(prefix) + len(".") + len(name) + if len(prefix) == 0 { + n -= len(".") + } + sb.grow(n) + sb.buf = append(sb.buf, prefix...) + sb.buf = append(sb.buf, '.') + sb.buf = append(sb.buf, name...) + return protoreflect.FullName(sb.last(n)) +} + +// MakeString is equivalent to string(b), but optimized for large batches +// with a shared lifetime. +func (sb *Builder) MakeString(b []byte) string { + sb.grow(len(b)) + sb.buf = append(sb.buf, b...) + return sb.last(len(b)) +} + +func (sb *Builder) grow(n int) { + if cap(sb.buf)-len(sb.buf) >= n { + return + } + + // Unlike strings.Builder, we do not need to copy over the contents + // of the old buffer since our builder provides no API for + // retrieving previously created strings. + sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n)) +} + +func (sb *Builder) last(n int) string { + return UnsafeString(sb.buf[len(sb.buf)-n:]) +} diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index b480c501..d8f48faf 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,8 +51,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 28 - Patch = 1 + Minor = 32 + Patch = 0 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index 48d47946..e5b03b56 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -69,7 +69,7 @@ func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { // UnmarshalState parses a wire-format message and places the result in m. // // This method permits fine-grained control over the unmarshaler. -// Most users should use Unmarshal instead. +// Most users should use [Unmarshal] instead. func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { if o.RecursionLimit == 0 { o.RecursionLimit = protowire.DefaultRecursionLimit diff --git a/vendor/google.golang.org/protobuf/proto/doc.go b/vendor/google.golang.org/protobuf/proto/doc.go index 08d2a46f..80ed16a0 100644 --- a/vendor/google.golang.org/protobuf/proto/doc.go +++ b/vendor/google.golang.org/protobuf/proto/doc.go @@ -5,43 +5,40 @@ // Package proto provides functions operating on protocol buffer messages. // // For documentation on protocol buffers in general, see: -// -// https://developers.google.com/protocol-buffers +// https://protobuf.dev. // // For a tutorial on using protocol buffers with Go, see: -// -// https://developers.google.com/protocol-buffers/docs/gotutorial +// https://protobuf.dev/getting-started/gotutorial. // // For a guide to generated Go protocol buffer code, see: -// -// https://developers.google.com/protocol-buffers/docs/reference/go-generated +// https://protobuf.dev/reference/go/go-generated. // // # Binary serialization // // This package contains functions to convert to and from the wire format, // an efficient binary serialization of protocol buffers. // -// • Size reports the size of a message in the wire format. +// - [Size] reports the size of a message in the wire format. // -// • Marshal converts a message to the wire format. -// The MarshalOptions type provides more control over wire marshaling. +// - [Marshal] converts a message to the wire format. +// The [MarshalOptions] type provides more control over wire marshaling. // -// • Unmarshal converts a message from the wire format. -// The UnmarshalOptions type provides more control over wire unmarshaling. +// - [Unmarshal] converts a message from the wire format. +// The [UnmarshalOptions] type provides more control over wire unmarshaling. // // # Basic message operations // -// • Clone makes a deep copy of a message. +// - [Clone] makes a deep copy of a message. // -// • Merge merges the content of a message into another. +// - [Merge] merges the content of a message into another. // -// • Equal compares two messages. For more control over comparisons -// and detailed reporting of differences, see package -// "google.golang.org/protobuf/testing/protocmp". +// - [Equal] compares two messages. For more control over comparisons +// and detailed reporting of differences, see package +// [google.golang.org/protobuf/testing/protocmp]. // -// • Reset clears the content of a message. +// - [Reset] clears the content of a message. // -// • CheckInitialized reports whether all required fields in a message are set. +// - [CheckInitialized] reports whether all required fields in a message are set. // // # Optional scalar constructors // @@ -49,9 +46,9 @@ // as pointers to a value. For example, an optional string field has the // Go type *string. // -// • Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, and String -// take a value and return a pointer to a new instance of it, -// to simplify construction of optional field values. +// - [Bool], [Int32], [Int64], [Uint32], [Uint64], [Float32], [Float64], and [String] +// take a value and return a pointer to a new instance of it, +// to simplify construction of optional field values. // // Generated enum types usually have an Enum method which performs the // same operation. @@ -60,29 +57,29 @@ // // # Extension accessors // -// • HasExtension, GetExtension, SetExtension, and ClearExtension -// access extension field values in a protocol buffer message. +// - [HasExtension], [GetExtension], [SetExtension], and [ClearExtension] +// access extension field values in a protocol buffer message. // // Extension fields are only supported in proto2. // // # Related packages // -// • Package "google.golang.org/protobuf/encoding/protojson" converts messages to -// and from JSON. +// - Package [google.golang.org/protobuf/encoding/protojson] converts messages to +// and from JSON. // -// • Package "google.golang.org/protobuf/encoding/prototext" converts messages to -// and from the text format. +// - Package [google.golang.org/protobuf/encoding/prototext] converts messages to +// and from the text format. // -// • Package "google.golang.org/protobuf/reflect/protoreflect" provides a -// reflection interface for protocol buffer data types. +// - Package [google.golang.org/protobuf/reflect/protoreflect] provides a +// reflection interface for protocol buffer data types. // -// • Package "google.golang.org/protobuf/testing/protocmp" provides features -// to compare protocol buffer messages with the "github.com/google/go-cmp/cmp" -// package. +// - Package [google.golang.org/protobuf/testing/protocmp] provides features +// to compare protocol buffer messages with the [github.com/google/go-cmp/cmp] +// package. // -// • Package "google.golang.org/protobuf/types/dynamicpb" provides a dynamic -// message type, suitable for working with messages where the protocol buffer -// type is only known at runtime. +// - Package [google.golang.org/protobuf/types/dynamicpb] provides a dynamic +// message type, suitable for working with messages where the protocol buffer +// type is only known at runtime. // // This module contains additional packages for more specialized use cases. // Consult the individual package documentation for details. diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go index bf7f816d..4fed202f 100644 --- a/vendor/google.golang.org/protobuf/proto/encode.go +++ b/vendor/google.golang.org/protobuf/proto/encode.go @@ -129,7 +129,7 @@ func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) { // MarshalState returns the wire-format encoding of a message. // // This method permits fine-grained control over the marshaler. -// Most users should use Marshal instead. +// Most users should use [Marshal] instead. func (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) { return o.marshal(in.Buf, in.Message) } diff --git a/vendor/google.golang.org/protobuf/proto/equal.go b/vendor/google.golang.org/protobuf/proto/equal.go index 67948dd1..1a0be1b0 100644 --- a/vendor/google.golang.org/protobuf/proto/equal.go +++ b/vendor/google.golang.org/protobuf/proto/equal.go @@ -5,30 +5,39 @@ package proto import ( - "bytes" - "math" "reflect" - "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/reflect/protoreflect" ) -// Equal reports whether two messages are equal. -// If two messages marshal to the same bytes under deterministic serialization, -// then Equal is guaranteed to report true. +// Equal reports whether two messages are equal, +// by recursively comparing the fields of the message. // -// Two messages are equal if they belong to the same message descriptor, -// have the same set of populated known and extension field values, -// and the same set of unknown fields values. If either of the top-level -// messages are invalid, then Equal reports true only if both are invalid. +// - Bytes fields are equal if they contain identical bytes. +// Empty bytes (regardless of nil-ness) are considered equal. // -// Scalar values are compared with the equivalent of the == operator in Go, -// except bytes values which are compared using bytes.Equal and -// floating point values which specially treat NaNs as equal. -// Message values are compared by recursively calling Equal. -// Lists are equal if each element value is also equal. -// Maps are equal if they have the same set of keys, where the pair of values -// for each key is also equal. +// - Floating-point fields are equal if they contain the same value. +// Unlike the == operator, a NaN is equal to another NaN. +// +// - Other scalar fields are equal if they contain the same value. +// +// - Message fields are equal if they have +// the same set of populated known and extension field values, and +// the same set of unknown fields values. +// +// - Lists are equal if they are the same length and +// each corresponding element is equal. +// +// - Maps are equal if they have the same set of keys and +// the corresponding value for each key is equal. +// +// An invalid message is not equal to a valid message. +// An invalid message is only equal to another invalid message of the +// same type. An invalid message often corresponds to a nil pointer +// of the concrete message type. For example, (*pb.M)(nil) is not equal +// to &pb.M{}. +// If two valid messages marshal to the same bytes under deterministic +// serialization, then Equal is guaranteed to report true. func Equal(x, y Message) bool { if x == nil || y == nil { return x == nil && y == nil @@ -42,130 +51,7 @@ func Equal(x, y Message) bool { if mx.IsValid() != my.IsValid() { return false } - return equalMessage(mx, my) -} - -// equalMessage compares two messages. -func equalMessage(mx, my protoreflect.Message) bool { - if mx.Descriptor() != my.Descriptor() { - return false - } - - nx := 0 - equal := true - mx.Range(func(fd protoreflect.FieldDescriptor, vx protoreflect.Value) bool { - nx++ - vy := my.Get(fd) - equal = my.Has(fd) && equalField(fd, vx, vy) - return equal - }) - if !equal { - return false - } - ny := 0 - my.Range(func(fd protoreflect.FieldDescriptor, vx protoreflect.Value) bool { - ny++ - return true - }) - if nx != ny { - return false - } - - return equalUnknown(mx.GetUnknown(), my.GetUnknown()) -} - -// equalField compares two fields. -func equalField(fd protoreflect.FieldDescriptor, x, y protoreflect.Value) bool { - switch { - case fd.IsList(): - return equalList(fd, x.List(), y.List()) - case fd.IsMap(): - return equalMap(fd, x.Map(), y.Map()) - default: - return equalValue(fd, x, y) - } -} - -// equalMap compares two maps. -func equalMap(fd protoreflect.FieldDescriptor, x, y protoreflect.Map) bool { - if x.Len() != y.Len() { - return false - } - equal := true - x.Range(func(k protoreflect.MapKey, vx protoreflect.Value) bool { - vy := y.Get(k) - equal = y.Has(k) && equalValue(fd.MapValue(), vx, vy) - return equal - }) - return equal -} - -// equalList compares two lists. -func equalList(fd protoreflect.FieldDescriptor, x, y protoreflect.List) bool { - if x.Len() != y.Len() { - return false - } - for i := x.Len() - 1; i >= 0; i-- { - if !equalValue(fd, x.Get(i), y.Get(i)) { - return false - } - } - return true -} - -// equalValue compares two singular values. -func equalValue(fd protoreflect.FieldDescriptor, x, y protoreflect.Value) bool { - switch fd.Kind() { - case protoreflect.BoolKind: - return x.Bool() == y.Bool() - case protoreflect.EnumKind: - return x.Enum() == y.Enum() - case protoreflect.Int32Kind, protoreflect.Sint32Kind, - protoreflect.Int64Kind, protoreflect.Sint64Kind, - protoreflect.Sfixed32Kind, protoreflect.Sfixed64Kind: - return x.Int() == y.Int() - case protoreflect.Uint32Kind, protoreflect.Uint64Kind, - protoreflect.Fixed32Kind, protoreflect.Fixed64Kind: - return x.Uint() == y.Uint() - case protoreflect.FloatKind, protoreflect.DoubleKind: - fx := x.Float() - fy := y.Float() - if math.IsNaN(fx) || math.IsNaN(fy) { - return math.IsNaN(fx) && math.IsNaN(fy) - } - return fx == fy - case protoreflect.StringKind: - return x.String() == y.String() - case protoreflect.BytesKind: - return bytes.Equal(x.Bytes(), y.Bytes()) - case protoreflect.MessageKind, protoreflect.GroupKind: - return equalMessage(x.Message(), y.Message()) - default: - return x.Interface() == y.Interface() - } -} - -// equalUnknown compares unknown fields by direct comparison on the raw bytes -// of each individual field number. -func equalUnknown(x, y protoreflect.RawFields) bool { - if len(x) != len(y) { - return false - } - if bytes.Equal([]byte(x), []byte(y)) { - return true - } - - mx := make(map[protoreflect.FieldNumber]protoreflect.RawFields) - my := make(map[protoreflect.FieldNumber]protoreflect.RawFields) - for len(x) > 0 { - fnum, _, n := protowire.ConsumeField(x) - mx[fnum] = append(mx[fnum], x[:n]...) - x = x[n:] - } - for len(y) > 0 { - fnum, _, n := protowire.ConsumeField(y) - my[fnum] = append(my[fnum], y[:n]...) - y = y[n:] - } - return reflect.DeepEqual(mx, my) + vx := protoreflect.ValueOfMessage(mx) + vy := protoreflect.ValueOfMessage(my) + return vx.Equal(vy) } diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go index 5f293cda..17899a3a 100644 --- a/vendor/google.golang.org/protobuf/proto/extension.go +++ b/vendor/google.golang.org/protobuf/proto/extension.go @@ -26,7 +26,7 @@ func HasExtension(m Message, xt protoreflect.ExtensionType) bool { } // ClearExtension clears an extension field such that subsequent -// HasExtension calls return false. +// [HasExtension] calls return false. // It panics if m is invalid or if xt does not extend m. func ClearExtension(m Message, xt protoreflect.ExtensionType) { m.ProtoReflect().Clear(xt.TypeDescriptor()) diff --git a/vendor/google.golang.org/protobuf/proto/merge.go b/vendor/google.golang.org/protobuf/proto/merge.go index d761ab33..3c6fe578 100644 --- a/vendor/google.golang.org/protobuf/proto/merge.go +++ b/vendor/google.golang.org/protobuf/proto/merge.go @@ -21,7 +21,7 @@ import ( // The unknown fields of src are appended to the unknown fields of dst. // // It is semantically equivalent to unmarshaling the encoded form of src -// into dst with the UnmarshalOptions.Merge option specified. +// into dst with the [UnmarshalOptions.Merge] option specified. func Merge(dst, src Message) { // TODO: Should nil src be treated as semantically equivalent to a // untyped, read-only, empty message? What about a nil dst? diff --git a/vendor/google.golang.org/protobuf/proto/proto.go b/vendor/google.golang.org/protobuf/proto/proto.go index 1f0d183b..7543ee6b 100644 --- a/vendor/google.golang.org/protobuf/proto/proto.go +++ b/vendor/google.golang.org/protobuf/proto/proto.go @@ -15,18 +15,20 @@ import ( // protobuf module that accept a Message, except where otherwise specified. // // This is the v2 interface definition for protobuf messages. -// The v1 interface definition is "github.com/golang/protobuf/proto".Message. +// The v1 interface definition is [github.com/golang/protobuf/proto.Message]. // -// To convert a v1 message to a v2 message, -// use "github.com/golang/protobuf/proto".MessageV2. -// To convert a v2 message to a v1 message, -// use "github.com/golang/protobuf/proto".MessageV1. +// - To convert a v1 message to a v2 message, +// use [google.golang.org/protobuf/protoadapt.MessageV2Of]. +// - To convert a v2 message to a v1 message, +// use [google.golang.org/protobuf/protoadapt.MessageV1Of]. type Message = protoreflect.ProtoMessage -// Error matches all errors produced by packages in the protobuf module. +// Error matches all errors produced by packages in the protobuf module +// according to [errors.Is]. // -// That is, errors.Is(err, Error) reports whether an error is produced -// by this module. +// Example usage: +// +// if errors.Is(err, proto.Error) { ... } var Error error func init() { diff --git a/vendor/google.golang.org/protobuf/proto/size.go b/vendor/google.golang.org/protobuf/proto/size.go index 554b9c6c..f1692b49 100644 --- a/vendor/google.golang.org/protobuf/proto/size.go +++ b/vendor/google.golang.org/protobuf/proto/size.go @@ -73,23 +73,27 @@ func (o MarshalOptions) sizeField(fd protoreflect.FieldDescriptor, value protore } func (o MarshalOptions) sizeList(num protowire.Number, fd protoreflect.FieldDescriptor, list protoreflect.List) (size int) { + sizeTag := protowire.SizeTag(num) + if fd.IsPacked() && list.Len() > 0 { content := 0 for i, llen := 0, list.Len(); i < llen; i++ { content += o.sizeSingular(num, fd.Kind(), list.Get(i)) } - return protowire.SizeTag(num) + protowire.SizeBytes(content) + return sizeTag + protowire.SizeBytes(content) } for i, llen := 0, list.Len(); i < llen; i++ { - size += protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), list.Get(i)) + size += sizeTag + o.sizeSingular(num, fd.Kind(), list.Get(i)) } return size } func (o MarshalOptions) sizeMap(num protowire.Number, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) (size int) { + sizeTag := protowire.SizeTag(num) + mapv.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool { - size += protowire.SizeTag(num) + size += sizeTag size += protowire.SizeBytes(o.sizeField(fd.MapKey(), key.Value()) + o.sizeField(fd.MapValue(), value)) return true }) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go index e4dfb120..baa0cc62 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -3,11 +3,11 @@ // license that can be found in the LICENSE file. // Package protodesc provides functionality for converting -// FileDescriptorProto messages to/from protoreflect.FileDescriptor values. +// FileDescriptorProto messages to/from [protoreflect.FileDescriptor] values. // // The google.protobuf.FileDescriptorProto is a protobuf message that describes // the type information for a .proto file in a form that is easily serializable. -// The protoreflect.FileDescriptor is a more structured representation of +// The [protoreflect.FileDescriptor] is a more structured representation of // the FileDescriptorProto message where references and remote dependencies // can be directly followed. package protodesc @@ -24,11 +24,11 @@ import ( "google.golang.org/protobuf/types/descriptorpb" ) -// Resolver is the resolver used by NewFile to resolve dependencies. +// Resolver is the resolver used by [NewFile] to resolve dependencies. // The enums and messages provided must belong to some parent file, // which is also registered. // -// It is implemented by protoregistry.Files. +// It is implemented by [protoregistry.Files]. type Resolver interface { FindFileByPath(string) (protoreflect.FileDescriptor, error) FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) @@ -61,19 +61,19 @@ type FileOptions struct { AllowUnresolvable bool } -// NewFile creates a new protoreflect.FileDescriptor from the provided -// file descriptor message. See FileOptions.New for more information. +// NewFile creates a new [protoreflect.FileDescriptor] from the provided +// file descriptor message. See [FileOptions.New] for more information. func NewFile(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { return FileOptions{}.New(fd, r) } -// NewFiles creates a new protoregistry.Files from the provided -// FileDescriptorSet message. See FileOptions.NewFiles for more information. +// NewFiles creates a new [protoregistry.Files] from the provided +// FileDescriptorSet message. See [FileOptions.NewFiles] for more information. func NewFiles(fd *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { return FileOptions{}.NewFiles(fd) } -// New creates a new protoreflect.FileDescriptor from the provided +// New creates a new [protoreflect.FileDescriptor] from the provided // file descriptor message. The file must represent a valid proto file according // to protobuf semantics. The returned descriptor is a deep copy of the input. // @@ -93,9 +93,15 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot f.L1.Syntax = protoreflect.Proto2 case "proto3": f.L1.Syntax = protoreflect.Proto3 + case "editions": + f.L1.Syntax = protoreflect.Editions + f.L1.Edition = fromEditionProto(fd.GetEdition()) default: return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) } + if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < SupportedEditionsMinimum || fd.GetEdition() > SupportedEditionsMaximum) { + return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) + } f.L1.Path = fd.GetName() if f.L1.Path == "" { return nil, errors.New("file path must be populated") @@ -108,6 +114,9 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot opts = proto.Clone(opts).(*descriptorpb.FileOptions) f.L2.Options = func() protoreflect.ProtoMessage { return opts } } + if f.L1.Syntax == protoreflect.Editions { + initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) + } f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency())) for _, i := range fd.GetPublicDependency() { @@ -231,7 +240,7 @@ func (is importSet) importPublic(imps protoreflect.FileImports) { } } -// NewFiles creates a new protoregistry.Files from the provided +// NewFiles creates a new [protoregistry.Files] from the provided // FileDescriptorSet message. The descriptor set must include only // valid files according to protobuf semantics. The returned descriptors // are a deep copy of the input. diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go index 37efda1a..aff6fd49 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -137,6 +137,30 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc if fd.JsonName != nil { f.L1.StringName.InitJSON(fd.GetJsonName()) } + + if f.Base.L0.ParentFile.Syntax() == protoreflect.Editions { + f.L1.Presence = resolveFeatureHasFieldPresence(f.Base.L0.ParentFile, fd) + // We reuse the existing field because the old option `[packed = + // true]` is mutually exclusive with the editions feature. + if fd.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED { + f.L1.HasPacked = true + f.L1.IsPacked = resolveFeatureRepeatedFieldEncodingPacked(f.Base.L0.ParentFile, fd) + } + + // We pretend this option is always explicitly set because the only + // use of HasEnforceUTF8 is to determine whether to use EnforceUTF8 + // or to return the appropriate default. + // When using editions we either parse the option or resolve the + // appropriate default here (instead of later when this option is + // requested from the descriptor). + // In proto2/proto3 syntax HasEnforceUTF8 might be false. + f.L1.HasEnforceUTF8 = true + f.L1.EnforceUTF8 = resolveFeatureEnforceUTF8(f.Base.L0.ParentFile, fd) + + if f.L1.Kind == protoreflect.MessageKind && resolveFeatureDelimitedEncoding(f.Base.L0.ParentFile, fd) { + f.L1.Kind = protoreflect.GroupKind + } + } } return fs, nil } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go new file mode 100644 index 00000000..7352926c --- /dev/null +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -0,0 +1,177 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package protodesc + +import ( + _ "embed" + "fmt" + "os" + "sync" + + "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" +) + +const ( + SupportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2 + SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023 +) + +//go:embed editions_defaults.binpb +var binaryEditionDefaults []byte +var defaults = &descriptorpb.FeatureSetDefaults{} +var defaultsCacheMu sync.Mutex +var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet) + +func init() { + err := proto.Unmarshal(binaryEditionDefaults, defaults) + if err != nil { + fmt.Fprintf(os.Stderr, "unmarshal editions defaults: %v\n", err) + os.Exit(1) + } +} + +func fromEditionProto(epb descriptorpb.Edition) filedesc.Edition { + return filedesc.Edition(epb) +} + +func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { + switch ed { + case filedesc.EditionUnknown: + return descriptorpb.Edition_EDITION_UNKNOWN + case filedesc.EditionProto2: + return descriptorpb.Edition_EDITION_PROTO2 + case filedesc.EditionProto3: + return descriptorpb.Edition_EDITION_PROTO3 + case filedesc.Edition2023: + return descriptorpb.Edition_EDITION_2023 + default: + panic(fmt.Sprintf("unknown value for edition: %v", ed)) + } +} + +func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { + defaultsCacheMu.Lock() + defer defaultsCacheMu.Unlock() + if def, ok := defaultsCache[ed]; ok { + return def + } + edpb := toEditionProto(ed) + if defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb { + // This should never happen protodesc.(FileOptions).New would fail when + // initializing the file descriptor. + // This most likely means the embedded defaults were not updated. + fmt.Fprintf(os.Stderr, "internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\n", edpb) + os.Exit(1) + } + fs := defaults.GetDefaults()[0].GetFeatures() + // Using a linear search for now. + // Editions are guaranteed to be sorted and thus we could use a binary search. + // Given that there are only a handful of editions (with one more per year) + // there is not much reason to use a binary search. + for _, def := range defaults.GetDefaults() { + if def.GetEdition() <= edpb { + fs = def.GetFeatures() + } else { + break + } + } + defaultsCache[ed] = fs + return fs +} + +func resolveFeatureHasFieldPresence(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { + fs := fieldDesc.GetOptions().GetFeatures() + if fs == nil || fs.FieldPresence == nil { + return fileDesc.L1.EditionFeatures.IsFieldPresence + } + return fs.GetFieldPresence() == descriptorpb.FeatureSet_LEGACY_REQUIRED || + fs.GetFieldPresence() == descriptorpb.FeatureSet_EXPLICIT +} + +func resolveFeatureRepeatedFieldEncodingPacked(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { + fs := fieldDesc.GetOptions().GetFeatures() + if fs == nil || fs.RepeatedFieldEncoding == nil { + return fileDesc.L1.EditionFeatures.IsPacked + } + return fs.GetRepeatedFieldEncoding() == descriptorpb.FeatureSet_PACKED +} + +func resolveFeatureEnforceUTF8(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { + fs := fieldDesc.GetOptions().GetFeatures() + if fs == nil || fs.Utf8Validation == nil { + return fileDesc.L1.EditionFeatures.IsUTF8Validated + } + return fs.GetUtf8Validation() == descriptorpb.FeatureSet_VERIFY +} + +func resolveFeatureDelimitedEncoding(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { + fs := fieldDesc.GetOptions().GetFeatures() + if fs == nil || fs.MessageEncoding == nil { + return fileDesc.L1.EditionFeatures.IsDelimitedEncoded + } + return fs.GetMessageEncoding() == descriptorpb.FeatureSet_DELIMITED +} + +// initFileDescFromFeatureSet initializes editions related fields in fd based +// on fs. If fs is nil it is assumed to be an empty featureset and all fields +// will be initialized with the appropriate default. fd.L1.Edition must be set +// before calling this function. +func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) { + dfs := getFeatureSetFor(fd.L1.Edition) + if fs == nil { + fs = &descriptorpb.FeatureSet{} + } + + var fieldPresence descriptorpb.FeatureSet_FieldPresence + if fp := fs.FieldPresence; fp != nil { + fieldPresence = *fp + } else { + fieldPresence = *dfs.FieldPresence + } + fd.L1.EditionFeatures.IsFieldPresence = fieldPresence == descriptorpb.FeatureSet_LEGACY_REQUIRED || + fieldPresence == descriptorpb.FeatureSet_EXPLICIT + + var enumType descriptorpb.FeatureSet_EnumType + if et := fs.EnumType; et != nil { + enumType = *et + } else { + enumType = *dfs.EnumType + } + fd.L1.EditionFeatures.IsOpenEnum = enumType == descriptorpb.FeatureSet_OPEN + + var respeatedFieldEncoding descriptorpb.FeatureSet_RepeatedFieldEncoding + if rfe := fs.RepeatedFieldEncoding; rfe != nil { + respeatedFieldEncoding = *rfe + } else { + respeatedFieldEncoding = *dfs.RepeatedFieldEncoding + } + fd.L1.EditionFeatures.IsPacked = respeatedFieldEncoding == descriptorpb.FeatureSet_PACKED + + var isUTF8Validated descriptorpb.FeatureSet_Utf8Validation + if utf8val := fs.Utf8Validation; utf8val != nil { + isUTF8Validated = *utf8val + } else { + isUTF8Validated = *dfs.Utf8Validation + } + fd.L1.EditionFeatures.IsUTF8Validated = isUTF8Validated == descriptorpb.FeatureSet_VERIFY + + var messageEncoding descriptorpb.FeatureSet_MessageEncoding + if me := fs.MessageEncoding; me != nil { + messageEncoding = *me + } else { + messageEncoding = *dfs.MessageEncoding + } + fd.L1.EditionFeatures.IsDelimitedEncoded = messageEncoding == descriptorpb.FeatureSet_DELIMITED + + var jsonFormat descriptorpb.FeatureSet_JsonFormat + if jf := fs.JsonFormat; jf != nil { + jsonFormat = *jf + } else { + jsonFormat = *dfs.JsonFormat + } + fd.L1.EditionFeatures.IsJSONCompliant = jsonFormat == descriptorpb.FeatureSet_ALLOW +} diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb b/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb new file mode 100644 index 00000000..1a8610a8 --- /dev/null +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb @@ -0,0 +1,4 @@ + +  (0 +  (0 +  (0 ( \ No newline at end of file diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go index a7c5ceff..9d6e0542 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go @@ -16,7 +16,7 @@ import ( "google.golang.org/protobuf/types/descriptorpb" ) -// ToFileDescriptorProto copies a protoreflect.FileDescriptor into a +// ToFileDescriptorProto copies a [protoreflect.FileDescriptor] into a // google.protobuf.FileDescriptorProto message. func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto { p := &descriptorpb.FileDescriptorProto{ @@ -70,13 +70,13 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD for i, exts := 0, file.Extensions(); i < exts.Len(); i++ { p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) } - if syntax := file.Syntax(); syntax != protoreflect.Proto2 { + if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() { p.Syntax = proto.String(file.Syntax().String()) } return p } -// ToDescriptorProto copies a protoreflect.MessageDescriptor into a +// ToDescriptorProto copies a [protoreflect.MessageDescriptor] into a // google.protobuf.DescriptorProto message. func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto { p := &descriptorpb.DescriptorProto{ @@ -119,7 +119,7 @@ func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.Des return p } -// ToFieldDescriptorProto copies a protoreflect.FieldDescriptor into a +// ToFieldDescriptorProto copies a [protoreflect.FieldDescriptor] into a // google.protobuf.FieldDescriptorProto message. func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto { p := &descriptorpb.FieldDescriptorProto{ @@ -168,7 +168,7 @@ func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.Fi return p } -// ToOneofDescriptorProto copies a protoreflect.OneofDescriptor into a +// ToOneofDescriptorProto copies a [protoreflect.OneofDescriptor] into a // google.protobuf.OneofDescriptorProto message. func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto { return &descriptorpb.OneofDescriptorProto{ @@ -177,7 +177,7 @@ func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.On } } -// ToEnumDescriptorProto copies a protoreflect.EnumDescriptor into a +// ToEnumDescriptorProto copies a [protoreflect.EnumDescriptor] into a // google.protobuf.EnumDescriptorProto message. func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto { p := &descriptorpb.EnumDescriptorProto{ @@ -200,7 +200,7 @@ func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumD return p } -// ToEnumValueDescriptorProto copies a protoreflect.EnumValueDescriptor into a +// ToEnumValueDescriptorProto copies a [protoreflect.EnumValueDescriptor] into a // google.protobuf.EnumValueDescriptorProto message. func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto { return &descriptorpb.EnumValueDescriptorProto{ @@ -210,7 +210,7 @@ func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descrip } } -// ToServiceDescriptorProto copies a protoreflect.ServiceDescriptor into a +// ToServiceDescriptorProto copies a [protoreflect.ServiceDescriptor] into a // google.protobuf.ServiceDescriptorProto message. func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto { p := &descriptorpb.ServiceDescriptorProto{ @@ -223,7 +223,7 @@ func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descripto return p } -// ToMethodDescriptorProto copies a protoreflect.MethodDescriptor into a +// ToMethodDescriptorProto copies a [protoreflect.MethodDescriptor] into a // google.protobuf.MethodDescriptorProto message. func ToMethodDescriptorProto(method protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto { p := &descriptorpb.MethodDescriptorProto{ diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go index 55aa1492..ec6572df 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go @@ -10,46 +10,46 @@ // // # Protocol Buffer Descriptors // -// Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor) +// Protobuf descriptors (e.g., [EnumDescriptor] or [MessageDescriptor]) // are immutable objects that represent protobuf type information. // They are wrappers around the messages declared in descriptor.proto. // Protobuf descriptors alone lack any information regarding Go types. // -// Enums and messages generated by this module implement Enum and ProtoMessage, +// Enums and messages generated by this module implement [Enum] and [ProtoMessage], // where the Descriptor and ProtoReflect.Descriptor accessors respectively // return the protobuf descriptor for the values. // // The protobuf descriptor interfaces are not meant to be implemented by // user code since they might need to be extended in the future to support // additions to the protobuf language. -// The "google.golang.org/protobuf/reflect/protodesc" package converts between +// The [google.golang.org/protobuf/reflect/protodesc] package converts between // google.protobuf.DescriptorProto messages and protobuf descriptors. // // # Go Type Descriptors // -// A type descriptor (e.g., EnumType or MessageType) is a constructor for +// A type descriptor (e.g., [EnumType] or [MessageType]) is a constructor for // a concrete Go type that represents the associated protobuf descriptor. // There is commonly a one-to-one relationship between protobuf descriptors and // Go type descriptors, but it can potentially be a one-to-many relationship. // -// Enums and messages generated by this module implement Enum and ProtoMessage, +// Enums and messages generated by this module implement [Enum] and [ProtoMessage], // where the Type and ProtoReflect.Type accessors respectively // return the protobuf descriptor for the values. // -// The "google.golang.org/protobuf/types/dynamicpb" package can be used to +// The [google.golang.org/protobuf/types/dynamicpb] package can be used to // create Go type descriptors from protobuf descriptors. // // # Value Interfaces // -// The Enum and Message interfaces provide a reflective view over an +// The [Enum] and [Message] interfaces provide a reflective view over an // enum or message instance. For enums, it provides the ability to retrieve // the enum value number for any concrete enum type. For messages, it provides // the ability to access or manipulate fields of the message. // -// To convert a proto.Message to a protoreflect.Message, use the +// To convert a [google.golang.org/protobuf/proto.Message] to a [protoreflect.Message], use the // former's ProtoReflect method. Since the ProtoReflect method is new to the // v2 message interface, it may not be present on older message implementations. -// The "github.com/golang/protobuf/proto".MessageReflect function can be used +// The [github.com/golang/protobuf/proto.MessageReflect] function can be used // to obtain a reflective view on older messages. // // # Relationships @@ -71,12 +71,12 @@ // │ │ // └────────────────── Type() ───────┘ // -// • An EnumType describes a concrete Go enum type. +// • An [EnumType] describes a concrete Go enum type. // It has an EnumDescriptor and can construct an Enum instance. // -// • An EnumDescriptor describes an abstract protobuf enum type. +// • An [EnumDescriptor] describes an abstract protobuf enum type. // -// • An Enum is a concrete enum instance. Generated enums implement Enum. +// • An [Enum] is a concrete enum instance. Generated enums implement Enum. // // ┌──────────────── New() ─────────────────┐ // │ │ @@ -90,24 +90,26 @@ // │ │ // └─────────────────── Type() ─────────┘ // -// • A MessageType describes a concrete Go message type. -// It has a MessageDescriptor and can construct a Message instance. -// Just as how Go's reflect.Type is a reflective description of a Go type, -// a MessageType is a reflective description of a Go type for a protobuf message. +// • A [MessageType] describes a concrete Go message type. +// It has a [MessageDescriptor] and can construct a [Message] instance. +// Just as how Go's [reflect.Type] is a reflective description of a Go type, +// a [MessageType] is a reflective description of a Go type for a protobuf message. // -// • A MessageDescriptor describes an abstract protobuf message type. -// It has no understanding of Go types. In order to construct a MessageType -// from just a MessageDescriptor, you can consider looking up the message type -// in the global registry using protoregistry.GlobalTypes.FindMessageByName -// or constructing a dynamic MessageType using dynamicpb.NewMessageType. +// • A [MessageDescriptor] describes an abstract protobuf message type. +// It has no understanding of Go types. In order to construct a [MessageType] +// from just a [MessageDescriptor], you can consider looking up the message type +// in the global registry using the FindMessageByName method on +// [google.golang.org/protobuf/reflect/protoregistry.GlobalTypes] +// or constructing a dynamic [MessageType] using +// [google.golang.org/protobuf/types/dynamicpb.NewMessageType]. // -// • A Message is a reflective view over a concrete message instance. -// Generated messages implement ProtoMessage, which can convert to a Message. -// Just as how Go's reflect.Value is a reflective view over a Go value, -// a Message is a reflective view over a concrete protobuf message instance. -// Using Go reflection as an analogy, the ProtoReflect method is similar to -// calling reflect.ValueOf, and the Message.Interface method is similar to -// calling reflect.Value.Interface. +// • A [Message] is a reflective view over a concrete message instance. +// Generated messages implement [ProtoMessage], which can convert to a [Message]. +// Just as how Go's [reflect.Value] is a reflective view over a Go value, +// a [Message] is a reflective view over a concrete protobuf message instance. +// Using Go reflection as an analogy, the [ProtoMessage.ProtoReflect] method is similar to +// calling [reflect.ValueOf], and the [Message.Interface] method is similar to +// calling [reflect.Value.Interface]. // // ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐ // │ V │ V @@ -119,15 +121,15 @@ // │ │ // └────── implements ────────┘ // -// • An ExtensionType describes a concrete Go implementation of an extension. -// It has an ExtensionTypeDescriptor and can convert to/from -// abstract Values and Go values. +// • An [ExtensionType] describes a concrete Go implementation of an extension. +// It has an [ExtensionTypeDescriptor] and can convert to/from +// an abstract [Value] and a Go value. // -// • An ExtensionTypeDescriptor is an ExtensionDescriptor -// which also has an ExtensionType. +// • An [ExtensionTypeDescriptor] is an [ExtensionDescriptor] +// which also has an [ExtensionType]. // -// • An ExtensionDescriptor describes an abstract protobuf extension field and -// may not always be an ExtensionTypeDescriptor. +// • An [ExtensionDescriptor] describes an abstract protobuf extension field and +// may not always be an [ExtensionTypeDescriptor]. package protoreflect import ( @@ -142,7 +144,7 @@ type doNotImplement pragma.DoNotImplement // ProtoMessage is the top-level interface that all proto messages implement. // This is declared in the protoreflect package to avoid a cyclic dependency; -// use the proto.Message type instead, which aliases this type. +// use the [google.golang.org/protobuf/proto.Message] type instead, which aliases this type. type ProtoMessage interface{ ProtoReflect() Message } // Syntax is the language version of the proto file. @@ -151,8 +153,9 @@ type Syntax syntax type syntax int8 // keep exact type opaque as the int type may change const ( - Proto2 Syntax = 2 - Proto3 Syntax = 3 + Proto2 Syntax = 2 + Proto3 Syntax = 3 + Editions Syntax = 4 ) // IsValid reports whether the syntax is valid. @@ -436,7 +439,7 @@ type Names interface { // FullName is a qualified name that uniquely identifies a proto declaration. // A qualified name is the concatenation of the proto package along with the // fully-declared name (i.e., name of parent preceding the name of the child), -// with a '.' delimiter placed between each Name. +// with a '.' delimiter placed between each [Name]. // // This should not have any leading or trailing dots. type FullName string // e.g., "google.protobuf.Field.Kind" @@ -480,7 +483,7 @@ func isLetterDigit(c byte) bool { } // Name returns the short name, which is the last identifier segment. -// A single segment FullName is the Name itself. +// A single segment FullName is the [Name] itself. func (n FullName) Name() Name { if i := strings.LastIndexByte(string(n), '.'); i >= 0 { return Name(n[i+1:]) diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go index b03c1223..0c045db6 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go @@ -35,6 +35,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte { b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo) case 12: b = p.appendSingularField(b, "syntax", nil) + case 14: + b = p.appendSingularField(b, "edition", nil) } return b } @@ -178,6 +180,8 @@ func (p *SourcePath) appendFileOptions(b []byte) []byte { b = p.appendSingularField(b, "php_metadata_namespace", nil) case 45: b = p.appendSingularField(b, "ruby_package", nil) + case 50: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -236,6 +240,10 @@ func (p *SourcePath) appendMessageOptions(b []byte) []byte { b = p.appendSingularField(b, "deprecated", nil) case 7: b = p.appendSingularField(b, "map_entry", nil) + case 11: + b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil) + case 12: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -279,6 +287,10 @@ func (p *SourcePath) appendEnumOptions(b []byte) []byte { b = p.appendSingularField(b, "allow_alias", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) + case 6: + b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil) + case 7: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -324,6 +336,8 @@ func (p *SourcePath) appendServiceOptions(b []byte) []byte { return b } switch (*p)[0] { + case 34: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 33: b = p.appendSingularField(b, "deprecated", nil) case 999: @@ -345,16 +359,49 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte { b = p.appendSingularField(b, "jstype", nil) case 5: b = p.appendSingularField(b, "lazy", nil) + case 15: + b = p.appendSingularField(b, "unverified_lazy", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) case 10: b = p.appendSingularField(b, "weak", nil) + case 16: + b = p.appendSingularField(b, "debug_redact", nil) + case 17: + b = p.appendSingularField(b, "retention", nil) + case 19: + b = p.appendRepeatedField(b, "targets", nil) + case 20: + b = p.appendRepeatedField(b, "edition_defaults", (*SourcePath).appendFieldOptions_EditionDefault) + case 21: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } +func (p *SourcePath) appendFeatureSet(b []byte) []byte { + if len(*p) == 0 { + return b + } + switch (*p)[0] { + case 1: + b = p.appendSingularField(b, "field_presence", nil) + case 2: + b = p.appendSingularField(b, "enum_type", nil) + case 3: + b = p.appendSingularField(b, "repeated_field_encoding", nil) + case 4: + b = p.appendSingularField(b, "utf8_validation", nil) + case 5: + b = p.appendSingularField(b, "message_encoding", nil) + case 6: + b = p.appendSingularField(b, "json_format", nil) + } + return b +} + func (p *SourcePath) appendUninterpretedOption(b []byte) []byte { if len(*p) == 0 { return b @@ -404,6 +451,12 @@ func (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte { switch (*p)[0] { case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) + case 2: + b = p.appendRepeatedField(b, "declaration", (*SourcePath).appendExtensionRangeOptions_Declaration) + case 50: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) + case 3: + b = p.appendSingularField(b, "verification", nil) } return b } @@ -413,6 +466,8 @@ func (p *SourcePath) appendOneofOptions(b []byte) []byte { return b } switch (*p)[0] { + case 1: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -426,6 +481,10 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { switch (*p)[0] { case 1: b = p.appendSingularField(b, "deprecated", nil) + case 2: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) + case 3: + b = p.appendSingularField(b, "debug_redact", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -441,12 +500,27 @@ func (p *SourcePath) appendMethodOptions(b []byte) []byte { b = p.appendSingularField(b, "deprecated", nil) case 34: b = p.appendSingularField(b, "idempotency_level", nil) + case 35: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } return b } +func (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte { + if len(*p) == 0 { + return b + } + switch (*p)[0] { + case 3: + b = p.appendSingularField(b, "edition", nil) + case 2: + b = p.appendSingularField(b, "value", nil) + } + return b +} + func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte { if len(*p) == 0 { return b @@ -459,3 +533,22 @@ func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte { } return b } + +func (p *SourcePath) appendExtensionRangeOptions_Declaration(b []byte) []byte { + if len(*p) == 0 { + return b + } + switch (*p)[0] { + case 1: + b = p.appendSingularField(b, "number", nil) + case 2: + b = p.appendSingularField(b, "full_name", nil) + case 3: + b = p.appendSingularField(b, "type", nil) + case 5: + b = p.appendSingularField(b, "reserved", nil) + case 6: + b = p.appendSingularField(b, "repeated", nil) + } + return b +} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index 3867470d..60ff62b4 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -12,7 +12,7 @@ package protoreflect // exactly identical. However, it is possible for the same semantically // identical proto type to be represented by multiple type descriptors. // -// For example, suppose we have t1 and t2 which are both MessageDescriptors. +// For example, suppose we have t1 and t2 which are both an [MessageDescriptor]. // If t1 == t2, then the types are definitely equal and all accessors return // the same information. However, if t1 != t2, then it is still possible that // they still represent the same proto type (e.g., t1.FullName == t2.FullName). @@ -115,7 +115,7 @@ type Descriptor interface { // corresponds with the google.protobuf.FileDescriptorProto message. // // Top-level declarations: -// EnumDescriptor, MessageDescriptor, FieldDescriptor, and/or ServiceDescriptor. +// [EnumDescriptor], [MessageDescriptor], [FieldDescriptor], and/or [ServiceDescriptor]. type FileDescriptor interface { Descriptor // Descriptor.FullName is identical to Package @@ -180,8 +180,8 @@ type FileImport struct { // corresponds with the google.protobuf.DescriptorProto message. // // Nested declarations: -// FieldDescriptor, OneofDescriptor, FieldDescriptor, EnumDescriptor, -// and/or MessageDescriptor. +// [FieldDescriptor], [OneofDescriptor], [FieldDescriptor], [EnumDescriptor], +// and/or [MessageDescriptor]. type MessageDescriptor interface { Descriptor @@ -214,7 +214,7 @@ type MessageDescriptor interface { ExtensionRanges() FieldRanges // ExtensionRangeOptions returns the ith extension range options. // - // To avoid a dependency cycle, this method returns a proto.Message value, + // To avoid a dependency cycle, this method returns a proto.Message] value, // which always contains a google.protobuf.ExtensionRangeOptions message. // This method returns a typed nil-pointer if no options are present. // The caller must import the descriptorpb package to use this. @@ -231,9 +231,9 @@ type MessageDescriptor interface { } type isMessageDescriptor interface{ ProtoType(MessageDescriptor) } -// MessageType encapsulates a MessageDescriptor with a concrete Go implementation. +// MessageType encapsulates a [MessageDescriptor] with a concrete Go implementation. // It is recommended that implementations of this interface also implement the -// MessageFieldTypes interface. +// [MessageFieldTypes] interface. type MessageType interface { // New returns a newly allocated empty message. // It may return nil for synthetic messages representing a map entry. @@ -249,19 +249,19 @@ type MessageType interface { Descriptor() MessageDescriptor } -// MessageFieldTypes extends a MessageType by providing type information +// MessageFieldTypes extends a [MessageType] by providing type information // regarding enums and messages referenced by the message fields. type MessageFieldTypes interface { MessageType - // Enum returns the EnumType for the ith field in Descriptor.Fields. + // Enum returns the EnumType for the ith field in MessageDescriptor.Fields. // It returns nil if the ith field is not an enum kind. // It panics if out of bounds. // // Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum() Enum(i int) EnumType - // Message returns the MessageType for the ith field in Descriptor.Fields. + // Message returns the MessageType for the ith field in MessageDescriptor.Fields. // It returns nil if the ith field is not a message or group kind. // It panics if out of bounds. // @@ -286,8 +286,8 @@ type MessageDescriptors interface { // corresponds with the google.protobuf.FieldDescriptorProto message. // // It is used for both normal fields defined within the parent message -// (e.g., MessageDescriptor.Fields) and fields that extend some remote message -// (e.g., FileDescriptor.Extensions or MessageDescriptor.Extensions). +// (e.g., [MessageDescriptor.Fields]) and fields that extend some remote message +// (e.g., [FileDescriptor.Extensions] or [MessageDescriptor.Extensions]). type FieldDescriptor interface { Descriptor @@ -344,7 +344,7 @@ type FieldDescriptor interface { // IsMap reports whether this field represents a map, // where the value type for the associated field is a Map. // It is equivalent to checking whether Cardinality is Repeated, - // that the Kind is MessageKind, and that Message.IsMapEntry reports true. + // that the Kind is MessageKind, and that MessageDescriptor.IsMapEntry reports true. IsMap() bool // MapKey returns the field descriptor for the key in the map entry. @@ -419,7 +419,7 @@ type OneofDescriptor interface { // IsSynthetic reports whether this is a synthetic oneof created to support // proto3 optional semantics. If true, Fields contains exactly one field - // with HasOptionalKeyword specified. + // with FieldDescriptor.HasOptionalKeyword specified. IsSynthetic() bool // Fields is a list of fields belonging to this oneof. @@ -442,10 +442,10 @@ type OneofDescriptors interface { doNotImplement } -// ExtensionDescriptor is an alias of FieldDescriptor for documentation. +// ExtensionDescriptor is an alias of [FieldDescriptor] for documentation. type ExtensionDescriptor = FieldDescriptor -// ExtensionTypeDescriptor is an ExtensionDescriptor with an associated ExtensionType. +// ExtensionTypeDescriptor is an [ExtensionDescriptor] with an associated [ExtensionType]. type ExtensionTypeDescriptor interface { ExtensionDescriptor @@ -470,12 +470,12 @@ type ExtensionDescriptors interface { doNotImplement } -// ExtensionType encapsulates an ExtensionDescriptor with a concrete +// ExtensionType encapsulates an [ExtensionDescriptor] with a concrete // Go implementation. The nested field descriptor must be for a extension field. // // While a normal field is a member of the parent message that it is declared -// within (see Descriptor.Parent), an extension field is a member of some other -// target message (see ExtensionDescriptor.Extendee) and may have no +// within (see [Descriptor.Parent]), an extension field is a member of some other +// target message (see [FieldDescriptor.ContainingMessage]) and may have no // relationship with the parent. However, the full name of an extension field is // relative to the parent that it is declared within. // @@ -532,7 +532,7 @@ type ExtensionType interface { // corresponds with the google.protobuf.EnumDescriptorProto message. // // Nested declarations: -// EnumValueDescriptor. +// [EnumValueDescriptor]. type EnumDescriptor interface { Descriptor @@ -548,7 +548,7 @@ type EnumDescriptor interface { } type isEnumDescriptor interface{ ProtoType(EnumDescriptor) } -// EnumType encapsulates an EnumDescriptor with a concrete Go implementation. +// EnumType encapsulates an [EnumDescriptor] with a concrete Go implementation. type EnumType interface { // New returns an instance of this enum type with its value set to n. New(n EnumNumber) Enum @@ -610,7 +610,7 @@ type EnumValueDescriptors interface { // ServiceDescriptor describes a service and // corresponds with the google.protobuf.ServiceDescriptorProto message. // -// Nested declarations: MethodDescriptor. +// Nested declarations: [MethodDescriptor]. type ServiceDescriptor interface { Descriptor diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go index f3198107..a7b0d06f 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go @@ -27,16 +27,16 @@ type Enum interface { // Message is a reflective interface for a concrete message value, // encapsulating both type and value information for the message. // -// Accessor/mutators for individual fields are keyed by FieldDescriptor. +// Accessor/mutators for individual fields are keyed by [FieldDescriptor]. // For non-extension fields, the descriptor must exactly match the // field known by the parent message. -// For extension fields, the descriptor must implement ExtensionTypeDescriptor, -// extend the parent message (i.e., have the same message FullName), and +// For extension fields, the descriptor must implement [ExtensionTypeDescriptor], +// extend the parent message (i.e., have the same message [FullName]), and // be within the parent's extension range. // -// Each field Value can be a scalar or a composite type (Message, List, or Map). -// See Value for the Go types associated with a FieldDescriptor. -// Providing a Value that is invalid or of an incorrect type panics. +// Each field [Value] can be a scalar or a composite type ([Message], [List], or [Map]). +// See [Value] for the Go types associated with a [FieldDescriptor]. +// Providing a [Value] that is invalid or of an incorrect type panics. type Message interface { // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. @@ -148,11 +148,11 @@ type Message interface { // be preserved in marshaling or other operations. IsValid() bool - // ProtoMethods returns optional fast-path implementions of various operations. + // ProtoMethods returns optional fast-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to - // "google.golang.org/protobuf/runtime/protoiface".Methods. + // google.golang.org/protobuf/runtime/protoiface.Methods. // Consult the protoiface package documentation for details. ProtoMethods() *methods } @@ -175,8 +175,8 @@ func (b RawFields) IsValid() bool { } // List is a zero-indexed, ordered list. -// The element Value type is determined by FieldDescriptor.Kind. -// Providing a Value that is invalid or of an incorrect type panics. +// The element [Value] type is determined by [FieldDescriptor.Kind]. +// Providing a [Value] that is invalid or of an incorrect type panics. type List interface { // Len reports the number of entries in the List. // Get, Set, and Truncate panic with out of bound indexes. @@ -226,9 +226,9 @@ type List interface { } // Map is an unordered, associative map. -// The entry MapKey type is determined by FieldDescriptor.MapKey.Kind. -// The entry Value type is determined by FieldDescriptor.MapValue.Kind. -// Providing a MapKey or Value that is invalid or of an incorrect type panics. +// The entry [MapKey] type is determined by [FieldDescriptor.MapKey].Kind. +// The entry [Value] type is determined by [FieldDescriptor.MapValue].Kind. +// Providing a [MapKey] or [Value] that is invalid or of an incorrect type panics. type Map interface { // Len reports the number of elements in the map. Len() int diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go new file mode 100644 index 00000000..654599d4 --- /dev/null +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go @@ -0,0 +1,168 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package protoreflect + +import ( + "bytes" + "fmt" + "math" + "reflect" + + "google.golang.org/protobuf/encoding/protowire" +) + +// Equal reports whether v1 and v2 are recursively equal. +// +// - Values of different types are always unequal. +// +// - Bytes values are equal if they contain identical bytes. +// Empty bytes (regardless of nil-ness) are considered equal. +// +// - Floating point values are equal if they contain the same value. +// Unlike the == operator, a NaN is equal to another NaN. +// +// - Enums are equal if they contain the same number. +// Since [Value] does not contain an enum descriptor, +// enum values do not consider the type of the enum. +// +// - Other scalar values are equal if they contain the same value. +// +// - [Message] values are equal if they belong to the same message descriptor, +// have the same set of populated known and extension field values, +// and the same set of unknown fields values. +// +// - [List] values are equal if they are the same length and +// each corresponding element is equal. +// +// - [Map] values are equal if they have the same set of keys and +// the corresponding value for each key is equal. +func (v1 Value) Equal(v2 Value) bool { + return equalValue(v1, v2) +} + +func equalValue(x, y Value) bool { + eqType := x.typ == y.typ + switch x.typ { + case nilType: + return eqType + case boolType: + return eqType && x.Bool() == y.Bool() + case int32Type, int64Type: + return eqType && x.Int() == y.Int() + case uint32Type, uint64Type: + return eqType && x.Uint() == y.Uint() + case float32Type, float64Type: + return eqType && equalFloat(x.Float(), y.Float()) + case stringType: + return eqType && x.String() == y.String() + case bytesType: + return eqType && bytes.Equal(x.Bytes(), y.Bytes()) + case enumType: + return eqType && x.Enum() == y.Enum() + default: + switch x := x.Interface().(type) { + case Message: + y, ok := y.Interface().(Message) + return ok && equalMessage(x, y) + case List: + y, ok := y.Interface().(List) + return ok && equalList(x, y) + case Map: + y, ok := y.Interface().(Map) + return ok && equalMap(x, y) + default: + panic(fmt.Sprintf("unknown type: %T", x)) + } + } +} + +// equalFloat compares two floats, where NaNs are treated as equal. +func equalFloat(x, y float64) bool { + if math.IsNaN(x) || math.IsNaN(y) { + return math.IsNaN(x) && math.IsNaN(y) + } + return x == y +} + +// equalMessage compares two messages. +func equalMessage(mx, my Message) bool { + if mx.Descriptor() != my.Descriptor() { + return false + } + + nx := 0 + equal := true + mx.Range(func(fd FieldDescriptor, vx Value) bool { + nx++ + vy := my.Get(fd) + equal = my.Has(fd) && equalValue(vx, vy) + return equal + }) + if !equal { + return false + } + ny := 0 + my.Range(func(fd FieldDescriptor, vx Value) bool { + ny++ + return true + }) + if nx != ny { + return false + } + + return equalUnknown(mx.GetUnknown(), my.GetUnknown()) +} + +// equalList compares two lists. +func equalList(x, y List) bool { + if x.Len() != y.Len() { + return false + } + for i := x.Len() - 1; i >= 0; i-- { + if !equalValue(x.Get(i), y.Get(i)) { + return false + } + } + return true +} + +// equalMap compares two maps. +func equalMap(x, y Map) bool { + if x.Len() != y.Len() { + return false + } + equal := true + x.Range(func(k MapKey, vx Value) bool { + vy := y.Get(k) + equal = y.Has(k) && equalValue(vx, vy) + return equal + }) + return equal +} + +// equalUnknown compares unknown fields by direct comparison on the raw bytes +// of each individual field number. +func equalUnknown(x, y RawFields) bool { + if len(x) != len(y) { + return false + } + if bytes.Equal([]byte(x), []byte(y)) { + return true + } + + mx := make(map[FieldNumber]RawFields) + my := make(map[FieldNumber]RawFields) + for len(x) > 0 { + fnum, _, n := protowire.ConsumeField(x) + mx[fnum] = append(mx[fnum], x[:n]...) + x = x[n:] + } + for len(y) > 0 { + fnum, _, n := protowire.ConsumeField(y) + my[fnum] = append(my[fnum], y[:n]...) + y = y[n:] + } + return reflect.DeepEqual(mx, my) +} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index ca8e28c5..16030973 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -11,7 +11,7 @@ import ( // Value is a union where only one Go type may be set at a time. // The Value is used to represent all possible values a field may take. -// The following shows which Go type is used to represent each proto Kind: +// The following shows which Go type is used to represent each proto [Kind]: // // ╔════════════╤═════════════════════════════════════╗ // ║ Go type │ Protobuf kind ║ @@ -31,22 +31,22 @@ import ( // // Multiple protobuf Kinds may be represented by a single Go type if the type // can losslessly represent the information for the proto kind. For example, -// Int64Kind, Sint64Kind, and Sfixed64Kind are all represented by int64, +// [Int64Kind], [Sint64Kind], and [Sfixed64Kind] are all represented by int64, // but use different integer encoding methods. // -// The List or Map types are used if the field cardinality is repeated. -// A field is a List if FieldDescriptor.IsList reports true. -// A field is a Map if FieldDescriptor.IsMap reports true. +// The [List] or [Map] types are used if the field cardinality is repeated. +// A field is a [List] if [FieldDescriptor.IsList] reports true. +// A field is a [Map] if [FieldDescriptor.IsMap] reports true. // // Converting to/from a Value and a concrete Go value panics on type mismatch. -// For example, ValueOf("hello").Int() panics because this attempts to +// For example, [ValueOf]("hello").Int() panics because this attempts to // retrieve an int64 from a string. // -// List, Map, and Message Values are called "composite" values. +// [List], [Map], and [Message] Values are called "composite" values. // // A composite Value may alias (reference) memory at some location, // such that changes to the Value updates the that location. -// A composite value acquired with a Mutable method, such as Message.Mutable, +// A composite value acquired with a Mutable method, such as [Message.Mutable], // always references the source object. // // For example: @@ -54,18 +54,18 @@ import ( // // Append a 0 to a "repeated int32" field. // // Since the Value returned by Mutable is guaranteed to alias // // the source message, modifying the Value modifies the message. -// message.Mutable(fieldDesc).(List).Append(protoreflect.ValueOfInt32(0)) +// message.Mutable(fieldDesc).List().Append(protoreflect.ValueOfInt32(0)) // // // Assign [0] to a "repeated int32" field by creating a new Value, // // modifying it, and assigning it. -// list := message.NewField(fieldDesc).(List) +// list := message.NewField(fieldDesc).List() // list.Append(protoreflect.ValueOfInt32(0)) // message.Set(fieldDesc, list) // // ERROR: Since it is not defined whether Set aliases the source, // // appending to the List here may or may not modify the message. // list.Append(protoreflect.ValueOfInt32(0)) // -// Some operations, such as Message.Get, may return an "empty, read-only" +// Some operations, such as [Message.Get], may return an "empty, read-only" // composite Value. Modifying an empty, read-only value panics. type Value value @@ -306,7 +306,7 @@ func (v Value) Float() float64 { } } -// String returns v as a string. Since this method implements fmt.Stringer, +// String returns v as a string. Since this method implements [fmt.Stringer], // this returns the formatted string value for any non-string type. func (v Value) String() string { switch v.typ { @@ -327,7 +327,7 @@ func (v Value) Bytes() []byte { } } -// Enum returns v as a EnumNumber and panics if the type is not a EnumNumber. +// Enum returns v as a [EnumNumber] and panics if the type is not a [EnumNumber]. func (v Value) Enum() EnumNumber { switch v.typ { case enumType: @@ -337,7 +337,7 @@ func (v Value) Enum() EnumNumber { } } -// Message returns v as a Message and panics if the type is not a Message. +// Message returns v as a [Message] and panics if the type is not a [Message]. func (v Value) Message() Message { switch vi := v.getIface().(type) { case Message: @@ -347,7 +347,7 @@ func (v Value) Message() Message { } } -// List returns v as a List and panics if the type is not a List. +// List returns v as a [List] and panics if the type is not a [List]. func (v Value) List() List { switch vi := v.getIface().(type) { case List: @@ -357,7 +357,7 @@ func (v Value) List() List { } } -// Map returns v as a Map and panics if the type is not a Map. +// Map returns v as a [Map] and panics if the type is not a [Map]. func (v Value) Map() Map { switch vi := v.getIface().(type) { case Map: @@ -367,7 +367,7 @@ func (v Value) Map() Map { } } -// MapKey returns v as a MapKey and panics for invalid MapKey types. +// MapKey returns v as a [MapKey] and panics for invalid [MapKey] types. func (v Value) MapKey() MapKey { switch v.typ { case boolType, int32Type, int64Type, uint32Type, uint64Type, stringType: @@ -378,8 +378,8 @@ func (v Value) MapKey() MapKey { } // MapKey is used to index maps, where the Go type of the MapKey must match -// the specified key Kind (see MessageDescriptor.IsMapEntry). -// The following shows what Go type is used to represent each proto Kind: +// the specified key [Kind] (see [MessageDescriptor.IsMapEntry]). +// The following shows what Go type is used to represent each proto [Kind]: // // ╔═════════╤═════════════════════════════════════╗ // ║ Go type │ Protobuf kind ║ @@ -392,13 +392,13 @@ func (v Value) MapKey() MapKey { // ║ string │ StringKind ║ // ╚═════════╧═════════════════════════════════════╝ // -// A MapKey is constructed and accessed through a Value: +// A MapKey is constructed and accessed through a [Value]: // // k := ValueOf("hash").MapKey() // convert string to MapKey // s := k.String() // convert MapKey to string // -// The MapKey is a strict subset of valid types used in Value; -// converting a Value to a MapKey with an invalid type panics. +// The MapKey is a strict subset of valid types used in [Value]; +// converting a [Value] to a MapKey with an invalid type panics. type MapKey value // IsValid reports whether k is populated with a value. @@ -426,13 +426,13 @@ func (k MapKey) Uint() uint64 { return Value(k).Uint() } -// String returns k as a string. Since this method implements fmt.Stringer, +// String returns k as a string. Since this method implements [fmt.Stringer], // this returns the formatted string value for any non-string type. func (k MapKey) String() string { return Value(k).String() } -// Value returns k as a Value. +// Value returns k as a [Value]. func (k MapKey) Value() Value { return Value(k) } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go similarity index 97% rename from vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go rename to vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go index 702ddf22..b1fdbe3e 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine -// +build !purego,!appengine +//go:build !purego && !appengine && !go1.21 +// +build !purego,!appengine,!go1.21 package protoreflect diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go new file mode 100644 index 00000000..43547011 --- /dev/null +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go @@ -0,0 +1,87 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !purego && !appengine && go1.21 +// +build !purego,!appengine,go1.21 + +package protoreflect + +import ( + "unsafe" + + "google.golang.org/protobuf/internal/pragma" +) + +type ( + ifaceHeader struct { + _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. + Type unsafe.Pointer + Data unsafe.Pointer + } +) + +var ( + nilType = typeOf(nil) + boolType = typeOf(*new(bool)) + int32Type = typeOf(*new(int32)) + int64Type = typeOf(*new(int64)) + uint32Type = typeOf(*new(uint32)) + uint64Type = typeOf(*new(uint64)) + float32Type = typeOf(*new(float32)) + float64Type = typeOf(*new(float64)) + stringType = typeOf(*new(string)) + bytesType = typeOf(*new([]byte)) + enumType = typeOf(*new(EnumNumber)) +) + +// typeOf returns a pointer to the Go type information. +// The pointer is comparable and equal if and only if the types are identical. +func typeOf(t interface{}) unsafe.Pointer { + return (*ifaceHeader)(unsafe.Pointer(&t)).Type +} + +// value is a union where only one type can be represented at a time. +// The struct is 24B large on 64-bit systems and requires the minimum storage +// necessary to represent each possible type. +// +// The Go GC needs to be able to scan variables containing pointers. +// As such, pointers and non-pointers cannot be intermixed. +type value struct { + pragma.DoNotCompare // 0B + + // typ stores the type of the value as a pointer to the Go type. + typ unsafe.Pointer // 8B + + // ptr stores the data pointer for a String, Bytes, or interface value. + ptr unsafe.Pointer // 8B + + // num stores a Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, or + // Enum value as a raw uint64. + // + // It is also used to store the length of a String or Bytes value; + // the capacity is ignored. + num uint64 // 8B +} + +func valueOfString(v string) Value { + return Value{typ: stringType, ptr: unsafe.Pointer(unsafe.StringData(v)), num: uint64(len(v))} +} +func valueOfBytes(v []byte) Value { + return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} +} +func valueOfIface(v interface{}) Value { + p := (*ifaceHeader)(unsafe.Pointer(&v)) + return Value{typ: p.Type, ptr: p.Data} +} + +func (v Value) getString() string { + return unsafe.String((*byte)(v.ptr), v.num) +} +func (v Value) getBytes() []byte { + return unsafe.Slice((*byte)(v.ptr), v.num) +} +func (v Value) getIface() (x interface{}) { + *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} + return x +} diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 58352a69..6267dc52 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -5,12 +5,12 @@ // Package protoregistry provides data structures to register and lookup // protobuf descriptor types. // -// The Files registry contains file descriptors and provides the ability +// The [Files] registry contains file descriptors and provides the ability // to iterate over the files or lookup a specific descriptor within the files. -// Files only contains protobuf descriptors and has no understanding of Go +// [Files] only contains protobuf descriptors and has no understanding of Go // type information that may be associated with each descriptor. // -// The Types registry contains descriptor types for which there is a known +// The [Types] registry contains descriptor types for which there is a known // Go type associated with that descriptor. It provides the ability to iterate // over the registered types or lookup a type by name. package protoregistry @@ -46,7 +46,7 @@ var conflictPolicy = "panic" // "panic" | "warn" | "ignore" // It is a variable so that the behavior is easily overridden in another file. var ignoreConflict = func(d protoreflect.Descriptor, err error) bool { const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT" - const faq = "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict" + const faq = "https://protobuf.dev/reference/go/faq#namespace-conflict" policy := conflictPolicy if v := os.Getenv(env); v != "" { policy = v @@ -218,7 +218,7 @@ func (r *Files) checkGenProtoConflict(path string) { // FindDescriptorByName looks up a descriptor by the full name. // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. func (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) { if r == nil { return nil, NotFound @@ -310,7 +310,7 @@ func (s *nameSuffix) Pop() (name protoreflect.Name) { // FindFileByPath looks up a file by the path. // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. // This returns an error if multiple files have the same path. func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) { if r == nil { @@ -431,7 +431,7 @@ func rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflec // A compliant implementation must deterministically return the same type // if no error is encountered. // -// The Types type implements this interface. +// The [Types] type implements this interface. type MessageTypeResolver interface { // FindMessageByName looks up a message by its full name. // E.g., "google.protobuf.Any" @@ -451,7 +451,7 @@ type MessageTypeResolver interface { // A compliant implementation must deterministically return the same type // if no error is encountered. // -// The Types type implements this interface. +// The [Types] type implements this interface. type ExtensionTypeResolver interface { // FindExtensionByName looks up a extension field by the field's full name. // Note that this is the full name of the field as determined by @@ -590,7 +590,7 @@ func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interfac // FindEnumByName looks up an enum by its full name. // E.g., "google.protobuf.Field.Kind". // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) { if r == nil { return nil, NotFound @@ -611,7 +611,7 @@ func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumTyp // FindMessageByName looks up a message by its full name, // e.g. "google.protobuf.Any". // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) { if r == nil { return nil, NotFound @@ -632,7 +632,7 @@ func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.M // FindMessageByURL looks up a message by a URL identifier. // See documentation on google.protobuf.Any.type_url for the URL format. // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) { // This function is similar to FindMessageByName but // truncates anything before and including '/' in the URL. @@ -662,7 +662,7 @@ func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) { // where the extension is declared and is unrelated to the full name of the // message being extended. // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) { if r == nil { return nil, NotFound @@ -703,7 +703,7 @@ func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.E // FindExtensionByNumber looks up a extension field by the field number // within some parent message, identified by full name. // -// This returns (nil, NotFound) if not found. +// This returns (nil, [NotFound]) if not found. func (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) { if r == nil { return nil, NotFound diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index abe4ab51..38daa858 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -48,6 +48,152 @@ import ( sync "sync" ) +// The full set of known editions. +type Edition int32 + +const ( + // A placeholder for an unknown edition value. + Edition_EDITION_UNKNOWN Edition = 0 + // Legacy syntax "editions". These pre-date editions, but behave much like + // distinct editions. These can't be used to specify the edition of proto + // files, but feature definitions must supply proto2/proto3 defaults for + // backwards compatibility. + Edition_EDITION_PROTO2 Edition = 998 + Edition_EDITION_PROTO3 Edition = 999 + // Editions that have been released. The specific values are arbitrary and + // should not be depended on, but they will always be time-ordered for easy + // comparison. + Edition_EDITION_2023 Edition = 1000 + // Placeholder editions for testing feature resolution. These should not be + // used or relyed on outside of tests. + Edition_EDITION_1_TEST_ONLY Edition = 1 + Edition_EDITION_2_TEST_ONLY Edition = 2 + Edition_EDITION_99997_TEST_ONLY Edition = 99997 + Edition_EDITION_99998_TEST_ONLY Edition = 99998 + Edition_EDITION_99999_TEST_ONLY Edition = 99999 +) + +// Enum value maps for Edition. +var ( + Edition_name = map[int32]string{ + 0: "EDITION_UNKNOWN", + 998: "EDITION_PROTO2", + 999: "EDITION_PROTO3", + 1000: "EDITION_2023", + 1: "EDITION_1_TEST_ONLY", + 2: "EDITION_2_TEST_ONLY", + 99997: "EDITION_99997_TEST_ONLY", + 99998: "EDITION_99998_TEST_ONLY", + 99999: "EDITION_99999_TEST_ONLY", + } + Edition_value = map[string]int32{ + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + } +) + +func (x Edition) Enum() *Edition { + p := new(Edition) + *p = x + return p +} + +func (x Edition) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Edition) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor() +} + +func (Edition) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[0] +} + +func (x Edition) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *Edition) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = Edition(num) + return nil +} + +// Deprecated: Use Edition.Descriptor instead. +func (Edition) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0} +} + +// The verification state of the extension range. +type ExtensionRangeOptions_VerificationState int32 + +const ( + // All the extensions of the range must be declared. + ExtensionRangeOptions_DECLARATION ExtensionRangeOptions_VerificationState = 0 + ExtensionRangeOptions_UNVERIFIED ExtensionRangeOptions_VerificationState = 1 +) + +// Enum value maps for ExtensionRangeOptions_VerificationState. +var ( + ExtensionRangeOptions_VerificationState_name = map[int32]string{ + 0: "DECLARATION", + 1: "UNVERIFIED", + } + ExtensionRangeOptions_VerificationState_value = map[string]int32{ + "DECLARATION": 0, + "UNVERIFIED": 1, + } +) + +func (x ExtensionRangeOptions_VerificationState) Enum() *ExtensionRangeOptions_VerificationState { + p := new(ExtensionRangeOptions_VerificationState) + *p = x + return p +} + +func (x ExtensionRangeOptions_VerificationState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor() +} + +func (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[1] +} + +func (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ExtensionRangeOptions_VerificationState) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ExtensionRangeOptions_VerificationState(num) + return nil +} + +// Deprecated: Use ExtensionRangeOptions_VerificationState.Descriptor instead. +func (ExtensionRangeOptions_VerificationState) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0} +} + type FieldDescriptorProto_Type int32 const ( @@ -67,9 +213,10 @@ const ( FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 + // Group type is deprecated and not supported after google.protobuf. However, Proto3 // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. + // treat group fields as unknown fields. In Editions, the group wire format + // can be enabled via the `message_encoding` feature. FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 // Length-delimited aggregate. // New in version 2. @@ -137,11 +284,11 @@ func (x FieldDescriptorProto_Type) String() string { } func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor() + return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor() } func (FieldDescriptorProto_Type) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[0] + return &file_google_protobuf_descriptor_proto_enumTypes[2] } func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber { @@ -168,21 +315,24 @@ type FieldDescriptorProto_Label int32 const ( // 0 is reserved for errors FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 - FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 + // The required label is only allowed in google.protobuf. In proto3 and Editions + // it's explicitly prohibited. In Editions, the `field_presence` feature + // can be used to get this behavior. + FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 ) // Enum value maps for FieldDescriptorProto_Label. var ( FieldDescriptorProto_Label_name = map[int32]string{ 1: "LABEL_OPTIONAL", - 2: "LABEL_REQUIRED", 3: "LABEL_REPEATED", + 2: "LABEL_REQUIRED", } FieldDescriptorProto_Label_value = map[string]int32{ "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2, } ) @@ -197,11 +347,11 @@ func (x FieldDescriptorProto_Label) String() string { } func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor() + return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor() } func (FieldDescriptorProto_Label) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[1] + return &file_google_protobuf_descriptor_proto_enumTypes[3] } func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber { @@ -258,11 +408,11 @@ func (x FileOptions_OptimizeMode) String() string { } func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor() + return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor() } func (FileOptions_OptimizeMode) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[2] + return &file_google_protobuf_descriptor_proto_enumTypes[4] } func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber { @@ -288,7 +438,13 @@ type FieldOptions_CType int32 const ( // Default mode. - FieldOptions_STRING FieldOptions_CType = 0 + FieldOptions_STRING FieldOptions_CType = 0 + // The option [ctype=CORD] may be applied to a non-repeated field of type + // "bytes". It indicates that in C++, the data should be stored in a Cord + // instead of a string. For very large strings, this may reduce memory + // fragmentation. It may also allow better performance when parsing from a + // Cord, or when parsing with aliasing enabled, as the parsed Cord may then + // alias the original buffer. FieldOptions_CORD FieldOptions_CType = 1 FieldOptions_STRING_PIECE FieldOptions_CType = 2 ) @@ -318,11 +474,11 @@ func (x FieldOptions_CType) String() string { } func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor() + return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() } func (FieldOptions_CType) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[3] + return &file_google_protobuf_descriptor_proto_enumTypes[5] } func (x FieldOptions_CType) Number() protoreflect.EnumNumber { @@ -369,103 +525,670 @@ var ( } ) -func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { - p := new(FieldOptions_JSType) +func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { + p := new(FieldOptions_JSType) + *p = x + return p +} + +func (x FieldOptions_JSType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor() +} + +func (FieldOptions_JSType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[6] +} + +func (x FieldOptions_JSType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_JSType(num) + return nil +} + +// Deprecated: Use FieldOptions_JSType.Descriptor instead. +func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} +} + +// If set to RETENTION_SOURCE, the option will be omitted from the binary. +// Note: as of January 2023, support for this is in progress and does not yet +// have an effect (b/264593489). +type FieldOptions_OptionRetention int32 + +const ( + FieldOptions_RETENTION_UNKNOWN FieldOptions_OptionRetention = 0 + FieldOptions_RETENTION_RUNTIME FieldOptions_OptionRetention = 1 + FieldOptions_RETENTION_SOURCE FieldOptions_OptionRetention = 2 +) + +// Enum value maps for FieldOptions_OptionRetention. +var ( + FieldOptions_OptionRetention_name = map[int32]string{ + 0: "RETENTION_UNKNOWN", + 1: "RETENTION_RUNTIME", + 2: "RETENTION_SOURCE", + } + FieldOptions_OptionRetention_value = map[string]int32{ + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2, + } +) + +func (x FieldOptions_OptionRetention) Enum() *FieldOptions_OptionRetention { + p := new(FieldOptions_OptionRetention) + *p = x + return p +} + +func (x FieldOptions_OptionRetention) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor() +} + +func (FieldOptions_OptionRetention) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[7] +} + +func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_OptionRetention) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_OptionRetention(num) + return nil +} + +// Deprecated: Use FieldOptions_OptionRetention.Descriptor instead. +func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 2} +} + +// This indicates the types of entities that the field may apply to when used +// as an option. If it is unset, then the field may be freely used as an +// option on any kind of entity. Note: as of January 2023, support for this is +// in progress and does not yet have an effect (b/264593489). +type FieldOptions_OptionTargetType int32 + +const ( + FieldOptions_TARGET_TYPE_UNKNOWN FieldOptions_OptionTargetType = 0 + FieldOptions_TARGET_TYPE_FILE FieldOptions_OptionTargetType = 1 + FieldOptions_TARGET_TYPE_EXTENSION_RANGE FieldOptions_OptionTargetType = 2 + FieldOptions_TARGET_TYPE_MESSAGE FieldOptions_OptionTargetType = 3 + FieldOptions_TARGET_TYPE_FIELD FieldOptions_OptionTargetType = 4 + FieldOptions_TARGET_TYPE_ONEOF FieldOptions_OptionTargetType = 5 + FieldOptions_TARGET_TYPE_ENUM FieldOptions_OptionTargetType = 6 + FieldOptions_TARGET_TYPE_ENUM_ENTRY FieldOptions_OptionTargetType = 7 + FieldOptions_TARGET_TYPE_SERVICE FieldOptions_OptionTargetType = 8 + FieldOptions_TARGET_TYPE_METHOD FieldOptions_OptionTargetType = 9 +) + +// Enum value maps for FieldOptions_OptionTargetType. +var ( + FieldOptions_OptionTargetType_name = map[int32]string{ + 0: "TARGET_TYPE_UNKNOWN", + 1: "TARGET_TYPE_FILE", + 2: "TARGET_TYPE_EXTENSION_RANGE", + 3: "TARGET_TYPE_MESSAGE", + 4: "TARGET_TYPE_FIELD", + 5: "TARGET_TYPE_ONEOF", + 6: "TARGET_TYPE_ENUM", + 7: "TARGET_TYPE_ENUM_ENTRY", + 8: "TARGET_TYPE_SERVICE", + 9: "TARGET_TYPE_METHOD", + } + FieldOptions_OptionTargetType_value = map[string]int32{ + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9, + } +) + +func (x FieldOptions_OptionTargetType) Enum() *FieldOptions_OptionTargetType { + p := new(FieldOptions_OptionTargetType) + *p = x + return p +} + +func (x FieldOptions_OptionTargetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor() +} + +func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[8] +} + +func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_OptionTargetType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_OptionTargetType(num) + return nil +} + +// Deprecated: Use FieldOptions_OptionTargetType.Descriptor instead. +func (FieldOptions_OptionTargetType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 3} +} + +// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +// or neither? HTTP based RPC implementation may choose GET verb for safe +// methods, and PUT verb for idempotent methods instead of the default POST. +type MethodOptions_IdempotencyLevel int32 + +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 + MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 // implies idempotent + MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 // idempotent, but may have side effects +) + +// Enum value maps for MethodOptions_IdempotencyLevel. +var ( + MethodOptions_IdempotencyLevel_name = map[int32]string{ + 0: "IDEMPOTENCY_UNKNOWN", + 1: "NO_SIDE_EFFECTS", + 2: "IDEMPOTENT", + } + MethodOptions_IdempotencyLevel_value = map[string]int32{ + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2, + } +) + +func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { + p := new(MethodOptions_IdempotencyLevel) + *p = x + return p +} + +func (x MethodOptions_IdempotencyLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor() +} + +func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[9] +} + +func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = MethodOptions_IdempotencyLevel(num) + return nil +} + +// Deprecated: Use MethodOptions_IdempotencyLevel.Descriptor instead. +func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0} +} + +type FeatureSet_FieldPresence int32 + +const ( + FeatureSet_FIELD_PRESENCE_UNKNOWN FeatureSet_FieldPresence = 0 + FeatureSet_EXPLICIT FeatureSet_FieldPresence = 1 + FeatureSet_IMPLICIT FeatureSet_FieldPresence = 2 + FeatureSet_LEGACY_REQUIRED FeatureSet_FieldPresence = 3 +) + +// Enum value maps for FeatureSet_FieldPresence. +var ( + FeatureSet_FieldPresence_name = map[int32]string{ + 0: "FIELD_PRESENCE_UNKNOWN", + 1: "EXPLICIT", + 2: "IMPLICIT", + 3: "LEGACY_REQUIRED", + } + FeatureSet_FieldPresence_value = map[string]int32{ + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3, + } +) + +func (x FeatureSet_FieldPresence) Enum() *FeatureSet_FieldPresence { + p := new(FeatureSet_FieldPresence) + *p = x + return p +} + +func (x FeatureSet_FieldPresence) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor() +} + +func (FeatureSet_FieldPresence) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[10] +} + +func (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_FieldPresence) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_FieldPresence(num) + return nil +} + +// Deprecated: Use FeatureSet_FieldPresence.Descriptor instead. +func (FeatureSet_FieldPresence) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0} +} + +type FeatureSet_EnumType int32 + +const ( + FeatureSet_ENUM_TYPE_UNKNOWN FeatureSet_EnumType = 0 + FeatureSet_OPEN FeatureSet_EnumType = 1 + FeatureSet_CLOSED FeatureSet_EnumType = 2 +) + +// Enum value maps for FeatureSet_EnumType. +var ( + FeatureSet_EnumType_name = map[int32]string{ + 0: "ENUM_TYPE_UNKNOWN", + 1: "OPEN", + 2: "CLOSED", + } + FeatureSet_EnumType_value = map[string]int32{ + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2, + } +) + +func (x FeatureSet_EnumType) Enum() *FeatureSet_EnumType { + p := new(FeatureSet_EnumType) + *p = x + return p +} + +func (x FeatureSet_EnumType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor() +} + +func (FeatureSet_EnumType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[11] +} + +func (x FeatureSet_EnumType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_EnumType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_EnumType(num) + return nil +} + +// Deprecated: Use FeatureSet_EnumType.Descriptor instead. +func (FeatureSet_EnumType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 1} +} + +type FeatureSet_RepeatedFieldEncoding int32 + +const ( + FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN FeatureSet_RepeatedFieldEncoding = 0 + FeatureSet_PACKED FeatureSet_RepeatedFieldEncoding = 1 + FeatureSet_EXPANDED FeatureSet_RepeatedFieldEncoding = 2 +) + +// Enum value maps for FeatureSet_RepeatedFieldEncoding. +var ( + FeatureSet_RepeatedFieldEncoding_name = map[int32]string{ + 0: "REPEATED_FIELD_ENCODING_UNKNOWN", + 1: "PACKED", + 2: "EXPANDED", + } + FeatureSet_RepeatedFieldEncoding_value = map[string]int32{ + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2, + } +) + +func (x FeatureSet_RepeatedFieldEncoding) Enum() *FeatureSet_RepeatedFieldEncoding { + p := new(FeatureSet_RepeatedFieldEncoding) + *p = x + return p +} + +func (x FeatureSet_RepeatedFieldEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor() +} + +func (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[12] +} + +func (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_RepeatedFieldEncoding) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_RepeatedFieldEncoding(num) + return nil +} + +// Deprecated: Use FeatureSet_RepeatedFieldEncoding.Descriptor instead. +func (FeatureSet_RepeatedFieldEncoding) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 2} +} + +type FeatureSet_Utf8Validation int32 + +const ( + FeatureSet_UTF8_VALIDATION_UNKNOWN FeatureSet_Utf8Validation = 0 + FeatureSet_NONE FeatureSet_Utf8Validation = 1 + FeatureSet_VERIFY FeatureSet_Utf8Validation = 2 +) + +// Enum value maps for FeatureSet_Utf8Validation. +var ( + FeatureSet_Utf8Validation_name = map[int32]string{ + 0: "UTF8_VALIDATION_UNKNOWN", + 1: "NONE", + 2: "VERIFY", + } + FeatureSet_Utf8Validation_value = map[string]int32{ + "UTF8_VALIDATION_UNKNOWN": 0, + "NONE": 1, + "VERIFY": 2, + } +) + +func (x FeatureSet_Utf8Validation) Enum() *FeatureSet_Utf8Validation { + p := new(FeatureSet_Utf8Validation) + *p = x + return p +} + +func (x FeatureSet_Utf8Validation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor() +} + +func (FeatureSet_Utf8Validation) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[13] +} + +func (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_Utf8Validation) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_Utf8Validation(num) + return nil +} + +// Deprecated: Use FeatureSet_Utf8Validation.Descriptor instead. +func (FeatureSet_Utf8Validation) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 3} +} + +type FeatureSet_MessageEncoding int32 + +const ( + FeatureSet_MESSAGE_ENCODING_UNKNOWN FeatureSet_MessageEncoding = 0 + FeatureSet_LENGTH_PREFIXED FeatureSet_MessageEncoding = 1 + FeatureSet_DELIMITED FeatureSet_MessageEncoding = 2 +) + +// Enum value maps for FeatureSet_MessageEncoding. +var ( + FeatureSet_MessageEncoding_name = map[int32]string{ + 0: "MESSAGE_ENCODING_UNKNOWN", + 1: "LENGTH_PREFIXED", + 2: "DELIMITED", + } + FeatureSet_MessageEncoding_value = map[string]int32{ + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2, + } +) + +func (x FeatureSet_MessageEncoding) Enum() *FeatureSet_MessageEncoding { + p := new(FeatureSet_MessageEncoding) + *p = x + return p +} + +func (x FeatureSet_MessageEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor() +} + +func (FeatureSet_MessageEncoding) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[14] +} + +func (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_MessageEncoding) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_MessageEncoding(num) + return nil +} + +// Deprecated: Use FeatureSet_MessageEncoding.Descriptor instead. +func (FeatureSet_MessageEncoding) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 4} +} + +type FeatureSet_JsonFormat int32 + +const ( + FeatureSet_JSON_FORMAT_UNKNOWN FeatureSet_JsonFormat = 0 + FeatureSet_ALLOW FeatureSet_JsonFormat = 1 + FeatureSet_LEGACY_BEST_EFFORT FeatureSet_JsonFormat = 2 +) + +// Enum value maps for FeatureSet_JsonFormat. +var ( + FeatureSet_JsonFormat_name = map[int32]string{ + 0: "JSON_FORMAT_UNKNOWN", + 1: "ALLOW", + 2: "LEGACY_BEST_EFFORT", + } + FeatureSet_JsonFormat_value = map[string]int32{ + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2, + } +) + +func (x FeatureSet_JsonFormat) Enum() *FeatureSet_JsonFormat { + p := new(FeatureSet_JsonFormat) *p = x return p } -func (x FieldOptions_JSType) String() string { +func (x FeatureSet_JsonFormat) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor() +func (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor() } -func (FieldOptions_JSType) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[4] +func (FeatureSet_JsonFormat) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[15] } -func (x FieldOptions_JSType) Number() protoreflect.EnumNumber { +func (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. -func (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error { +func (x *FeatureSet_JsonFormat) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = FieldOptions_JSType(num) + *x = FeatureSet_JsonFormat(num) return nil } -// Deprecated: Use FieldOptions_JSType.Descriptor instead. -func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} +// Deprecated: Use FeatureSet_JsonFormat.Descriptor instead. +func (FeatureSet_JsonFormat) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 5} } -// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, -// or neither? HTTP based RPC implementation may choose GET verb for safe -// methods, and PUT verb for idempotent methods instead of the default POST. -type MethodOptions_IdempotencyLevel int32 +// Represents the identified object's effect on the element in the original +// .proto file. +type GeneratedCodeInfo_Annotation_Semantic int32 const ( - MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 - MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 // implies idempotent - MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 // idempotent, but may have side effects + // There is no effect or the effect is indescribable. + GeneratedCodeInfo_Annotation_NONE GeneratedCodeInfo_Annotation_Semantic = 0 + // The element is set or otherwise mutated. + GeneratedCodeInfo_Annotation_SET GeneratedCodeInfo_Annotation_Semantic = 1 + // An alias to the element is returned. + GeneratedCodeInfo_Annotation_ALIAS GeneratedCodeInfo_Annotation_Semantic = 2 ) -// Enum value maps for MethodOptions_IdempotencyLevel. +// Enum value maps for GeneratedCodeInfo_Annotation_Semantic. var ( - MethodOptions_IdempotencyLevel_name = map[int32]string{ - 0: "IDEMPOTENCY_UNKNOWN", - 1: "NO_SIDE_EFFECTS", - 2: "IDEMPOTENT", + GeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{ + 0: "NONE", + 1: "SET", + 2: "ALIAS", } - MethodOptions_IdempotencyLevel_value = map[string]int32{ - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2, + GeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{ + "NONE": 0, + "SET": 1, + "ALIAS": 2, } ) -func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { - p := new(MethodOptions_IdempotencyLevel) +func (x GeneratedCodeInfo_Annotation_Semantic) Enum() *GeneratedCodeInfo_Annotation_Semantic { + p := new(GeneratedCodeInfo_Annotation_Semantic) *p = x return p } -func (x MethodOptions_IdempotencyLevel) String() string { +func (x GeneratedCodeInfo_Annotation_Semantic) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() +func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor() } -func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[5] +func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[16] } -func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber { +func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. -func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error { +func (x *GeneratedCodeInfo_Annotation_Semantic) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = MethodOptions_IdempotencyLevel(num) + *x = GeneratedCodeInfo_Annotation_Semantic(num) return nil } -// Deprecated: Use MethodOptions_IdempotencyLevel.Descriptor instead. -func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0} +// Deprecated: Use GeneratedCodeInfo_Annotation_Semantic.Descriptor instead. +func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0, 0} } // The protocol compiler can output a FileDescriptorSet containing the .proto @@ -544,8 +1267,12 @@ type FileDescriptorProto struct { // development tools. SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` // The syntax of the proto file. - // The supported values are "proto2" and "proto3". + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + // The edition of the proto file. + Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` } func (x *FileDescriptorProto) Reset() { @@ -664,6 +1391,13 @@ func (x *FileDescriptorProto) GetSyntax() string { return "" } +func (x *FileDescriptorProto) GetEdition() Edition { + if x != nil && x.Edition != nil { + return *x.Edition + } + return Edition_EDITION_UNKNOWN +} + // Describes a message type. type DescriptorProto struct { state protoimpl.MessageState @@ -794,7 +1528,22 @@ type ExtensionRangeOptions struct { // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` -} + // For external users: DO NOT USE. We are in the process of open sourcing + // extension declaration and executing internal cleanups before it can be + // used externally. + Declaration []*ExtensionRangeOptions_Declaration `protobuf:"bytes,2,rep,name=declaration" json:"declaration,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"` + // The verification state of the range. + // TODO: flip the default to DECLARATION once all empty ranges + // are marked as UNVERIFIED. + Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` +} + +// Default values for ExtensionRangeOptions fields. +const ( + Default_ExtensionRangeOptions_Verification = ExtensionRangeOptions_UNVERIFIED +) func (x *ExtensionRangeOptions) Reset() { *x = ExtensionRangeOptions{} @@ -835,6 +1584,27 @@ func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption return nil } +func (x *ExtensionRangeOptions) GetDeclaration() []*ExtensionRangeOptions_Declaration { + if x != nil { + return x.Declaration + } + return nil +} + +func (x *ExtensionRangeOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_VerificationState { + if x != nil && x.Verification != nil { + return *x.Verification + } + return Default_ExtensionRangeOptions_Verification +} + // Describes a field within a message. type FieldDescriptorProto struct { state protoimpl.MessageState @@ -860,7 +1630,6 @@ type FieldDescriptorProto struct { // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` // If set, gives the index of a oneof in the containing type's oneof_decl // list. This field is a member of that oneof. @@ -1382,22 +2151,22 @@ type FileOptions struct { // inappropriate because proto packages do not normally start with backwards // domain names. JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` - // If set true, then the Java code generator will generate a separate .java + // If enabled, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` // This option does nothing. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // If set true, then the Java2 code generator will generate code that // throws an exception whenever an attempt is made to assign a non-UTF-8 @@ -1460,6 +2229,8 @@ type FileOptions struct { // is empty. When this option is not set, the package name will be used for // determining the ruby package. RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` @@ -1531,7 +2302,7 @@ func (x *FileOptions) GetJavaMultipleFiles() bool { return Default_FileOptions_JavaMultipleFiles } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool { if x != nil && x.JavaGenerateEqualsAndHash != nil { return *x.JavaGenerateEqualsAndHash @@ -1651,6 +2422,13 @@ func (x *FileOptions) GetRubyPackage() string { return "" } +func (x *FileOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -1670,10 +2448,12 @@ type MessageOptions struct { // efficient, has fewer features, and is more complicated. // // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } + // + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // // Note that the message cannot have any defined fields; MessageSets only // have extensions. // @@ -1692,28 +2472,46 @@ type MessageOptions struct { // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + // // Whether the message is an automatically generated map entry type for the // maps field. // // For maps fields: - // map map_field = 1; + // + // map map_field = 1; + // // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; + // + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,11,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -1785,6 +2583,21 @@ func (x *MessageOptions) GetMapEntry() bool { return false } +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *MessageOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { + if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { + return *x.DeprecatedLegacyJsonFieldConflicts + } + return false +} + +func (x *MessageOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -1800,14 +2613,18 @@ type FieldOptions struct { // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! + // options below. This option is only implemented to support use of + // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + // type "bytes" in the open source release -- sorry, we'll try to include + // other types in a future version! Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. + // false will avoid using packed encoding. This option is prohibited in + // Editions, but the `repeated_field_encoding` feature can be used to control + // the behavior. Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` // The jstype option determines the JavaScript type used for values of the // field. The option is permitted only for 64 bit integral and fixed types @@ -1838,7 +2655,6 @@ type FieldOptions struct { // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // - // // Note that implementations may choose not to check required fields within // a lazy sub-message. That is, calling IsInitialized() on the outer message // may return true even if the inner message has missing required fields. @@ -1849,7 +2665,14 @@ type FieldOptions struct { // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. + // + // As of May 2022, lazy verifies the contents of the byte stream during + // parsing. An invalid byte stream will cause the overall parsing to fail. Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + UnverifiedLazy *bool `protobuf:"varint,15,opt,name=unverified_lazy,json=unverifiedLazy,def=0" json:"unverified_lazy,omitempty"` // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this @@ -1857,17 +2680,27 @@ type FieldOptions struct { Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // For Google-internal migration only. Do not use. Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + DebugRedact *bool `protobuf:"varint,16,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + Retention *FieldOptions_OptionRetention `protobuf:"varint,17,opt,name=retention,enum=google.protobuf.FieldOptions_OptionRetention" json:"retention,omitempty"` + Targets []FieldOptions_OptionTargetType `protobuf:"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType" json:"targets,omitempty"` + EditionDefaults []*FieldOptions_EditionDefault `protobuf:"bytes,20,rep,name=edition_defaults,json=editionDefaults" json:"edition_defaults,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for FieldOptions fields. const ( - Default_FieldOptions_Ctype = FieldOptions_STRING - Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL - Default_FieldOptions_Lazy = bool(false) - Default_FieldOptions_Deprecated = bool(false) - Default_FieldOptions_Weak = bool(false) + Default_FieldOptions_Ctype = FieldOptions_STRING + Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL + Default_FieldOptions_Lazy = bool(false) + Default_FieldOptions_UnverifiedLazy = bool(false) + Default_FieldOptions_Deprecated = bool(false) + Default_FieldOptions_Weak = bool(false) + Default_FieldOptions_DebugRedact = bool(false) ) func (x *FieldOptions) Reset() { @@ -1930,6 +2763,13 @@ func (x *FieldOptions) GetLazy() bool { return Default_FieldOptions_Lazy } +func (x *FieldOptions) GetUnverifiedLazy() bool { + if x != nil && x.UnverifiedLazy != nil { + return *x.UnverifiedLazy + } + return Default_FieldOptions_UnverifiedLazy +} + func (x *FieldOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated @@ -1944,6 +2784,41 @@ func (x *FieldOptions) GetWeak() bool { return Default_FieldOptions_Weak } +func (x *FieldOptions) GetDebugRedact() bool { + if x != nil && x.DebugRedact != nil { + return *x.DebugRedact + } + return Default_FieldOptions_DebugRedact +} + +func (x *FieldOptions) GetRetention() FieldOptions_OptionRetention { + if x != nil && x.Retention != nil { + return *x.Retention + } + return FieldOptions_RETENTION_UNKNOWN +} + +func (x *FieldOptions) GetTargets() []FieldOptions_OptionTargetType { + if x != nil { + return x.Targets + } + return nil +} + +func (x *FieldOptions) GetEditionDefaults() []*FieldOptions_EditionDefault { + if x != nil { + return x.EditionDefaults + } + return nil +} + +func (x *FieldOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -1957,6 +2832,8 @@ type OneofOptions struct { unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -1993,6 +2870,13 @@ func (*OneofOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13} } +func (x *OneofOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2014,6 +2898,17 @@ type EnumOptions struct { // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO Remove this legacy behavior once downstream teams have + // had time to migrate. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,6,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -2069,6 +2964,21 @@ func (x *EnumOptions) GetDeprecated() bool { return Default_EnumOptions_Deprecated } +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *EnumOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { + if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { + return *x.DeprecatedLegacyJsonFieldConflicts + } + return false +} + +func (x *EnumOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2087,13 +2997,20 @@ type EnumValueOptions struct { // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values. Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` + // Indicate that fields annotated with this enum value should not be printed + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for EnumValueOptions fields. const ( - Default_EnumValueOptions_Deprecated = bool(false) + Default_EnumValueOptions_Deprecated = bool(false) + Default_EnumValueOptions_DebugRedact = bool(false) ) func (x *EnumValueOptions) Reset() { @@ -2135,6 +3052,20 @@ func (x *EnumValueOptions) GetDeprecated() bool { return Default_EnumValueOptions_Deprecated } +func (x *EnumValueOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *EnumValueOptions) GetDebugRedact() bool { + if x != nil && x.DebugRedact != nil { + return *x.DebugRedact + } + return Default_EnumValueOptions_DebugRedact +} + func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2148,6 +3079,8 @@ type ServiceOptions struct { unknownFields protoimpl.UnknownFields extensionFields protoimpl.ExtensionFields + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"` // Is this service deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, @@ -2194,6 +3127,13 @@ func (*ServiceOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16} } +func (x *ServiceOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *ServiceOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated @@ -2220,6 +3160,8 @@ type MethodOptions struct { // this is a formalization for deprecating methods. Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -2276,6 +3218,13 @@ func (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { return Default_MethodOptions_IdempotencyLevel } +func (x *MethodOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2386,6 +3335,171 @@ func (x *UninterpretedOption) GetAggregateValue() string { return "" } +// TODO Enums in C++ gencode (and potentially other languages) are +// not well scoped. This means that each of the feature enums below can clash +// with each other. The short names we've chosen maximize call-site +// readability, but leave us very open to this scenario. A future feature will +// be designed and implemented to handle this, hopefully before we ever hit a +// conflict here. +type FeatureSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + + FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"` + EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"` + RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"` + Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"` + MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"` + JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"` +} + +func (x *FeatureSet) Reset() { + *x = FeatureSet{} + if protoimpl.UnsafeEnabled { + mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeatureSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureSet) ProtoMessage() {} + +func (x *FeatureSet) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureSet.ProtoReflect.Descriptor instead. +func (*FeatureSet) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19} +} + +func (x *FeatureSet) GetFieldPresence() FeatureSet_FieldPresence { + if x != nil && x.FieldPresence != nil { + return *x.FieldPresence + } + return FeatureSet_FIELD_PRESENCE_UNKNOWN +} + +func (x *FeatureSet) GetEnumType() FeatureSet_EnumType { + if x != nil && x.EnumType != nil { + return *x.EnumType + } + return FeatureSet_ENUM_TYPE_UNKNOWN +} + +func (x *FeatureSet) GetRepeatedFieldEncoding() FeatureSet_RepeatedFieldEncoding { + if x != nil && x.RepeatedFieldEncoding != nil { + return *x.RepeatedFieldEncoding + } + return FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN +} + +func (x *FeatureSet) GetUtf8Validation() FeatureSet_Utf8Validation { + if x != nil && x.Utf8Validation != nil { + return *x.Utf8Validation + } + return FeatureSet_UTF8_VALIDATION_UNKNOWN +} + +func (x *FeatureSet) GetMessageEncoding() FeatureSet_MessageEncoding { + if x != nil && x.MessageEncoding != nil { + return *x.MessageEncoding + } + return FeatureSet_MESSAGE_ENCODING_UNKNOWN +} + +func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat { + if x != nil && x.JsonFormat != nil { + return *x.JsonFormat + } + return FeatureSet_JSON_FORMAT_UNKNOWN +} + +// A compiled specification for the defaults of a set of features. These +// messages are generated from FeatureSet extensions and can be used to seed +// feature resolution. The resolution with this object becomes a simple search +// for the closest matching edition, followed by proto merges. +type FeatureSetDefaults struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"` + // The minimum supported edition (inclusive) when this was constructed. + // Editions before this will not have defaults. + MinimumEdition *Edition `protobuf:"varint,4,opt,name=minimum_edition,json=minimumEdition,enum=google.protobuf.Edition" json:"minimum_edition,omitempty"` + // The maximum known edition (inclusive) when this was constructed. Editions + // after this will not have reliable defaults. + MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"` +} + +func (x *FeatureSetDefaults) Reset() { + *x = FeatureSetDefaults{} + if protoimpl.UnsafeEnabled { + mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeatureSetDefaults) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureSetDefaults) ProtoMessage() {} + +func (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureSetDefaults.ProtoReflect.Descriptor instead. +func (*FeatureSetDefaults) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20} +} + +func (x *FeatureSetDefaults) GetDefaults() []*FeatureSetDefaults_FeatureSetEditionDefault { + if x != nil { + return x.Defaults + } + return nil +} + +func (x *FeatureSetDefaults) GetMinimumEdition() Edition { + if x != nil && x.MinimumEdition != nil { + return *x.MinimumEdition + } + return Edition_EDITION_UNKNOWN +} + +func (x *FeatureSetDefaults) GetMaximumEdition() Edition { + if x != nil && x.MaximumEdition != nil { + return *x.MaximumEdition + } + return Edition_EDITION_UNKNOWN +} + // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. type SourceCodeInfo struct { @@ -2399,50 +3513,55 @@ type SourceCodeInfo struct { // tools. // // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } + // + // message Foo { + // optional string foo = 1; + // } + // // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi + // + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). // // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendant. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` } func (x *SourceCodeInfo) Reset() { *x = SourceCodeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + mi := &file_google_protobuf_descriptor_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2455,7 +3574,7 @@ func (x *SourceCodeInfo) String() string { func (*SourceCodeInfo) ProtoMessage() {} func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + mi := &file_google_protobuf_descriptor_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2468,7 +3587,7 @@ func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use SourceCodeInfo.ProtoReflect.Descriptor instead. func (*SourceCodeInfo) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19} + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21} } func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { @@ -2494,7 +3613,7 @@ type GeneratedCodeInfo struct { func (x *GeneratedCodeInfo) Reset() { *x = GeneratedCodeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + mi := &file_google_protobuf_descriptor_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2507,7 +3626,7 @@ func (x *GeneratedCodeInfo) String() string { func (*GeneratedCodeInfo) ProtoMessage() {} func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + mi := &file_google_protobuf_descriptor_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2520,7 +3639,7 @@ func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GeneratedCodeInfo.ProtoReflect.Descriptor instead. func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20} + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22} } func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { @@ -2543,7 +3662,7 @@ type DescriptorProto_ExtensionRange struct { func (x *DescriptorProto_ExtensionRange) Reset() { *x = DescriptorProto_ExtensionRange{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[21] + mi := &file_google_protobuf_descriptor_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2556,7 +3675,7 @@ func (x *DescriptorProto_ExtensionRange) String() string { func (*DescriptorProto_ExtensionRange) ProtoMessage() {} func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[21] + mi := &file_google_protobuf_descriptor_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2608,7 +3727,7 @@ type DescriptorProto_ReservedRange struct { func (x *DescriptorProto_ReservedRange) Reset() { *x = DescriptorProto_ReservedRange{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[22] + mi := &file_google_protobuf_descriptor_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2621,7 +3740,7 @@ func (x *DescriptorProto_ReservedRange) String() string { func (*DescriptorProto_ReservedRange) ProtoMessage() {} func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[22] + mi := &file_google_protobuf_descriptor_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2651,6 +3770,96 @@ func (x *DescriptorProto_ReservedRange) GetEnd() int32 { return 0 } +type ExtensionRangeOptions_Declaration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The extension number declared within the extension range. + Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` + // The fully-qualified name of the extension field. There must be a leading + // dot in front of the full name. + FullName *string `protobuf:"bytes,2,opt,name=full_name,json=fullName" json:"full_name,omitempty"` + // The fully-qualified type name of the extension field. Unlike + // Metadata.type, Declaration.type must have a leading dot for messages + // and enums. + Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"` + // If true, indicates that the number is reserved in the extension range, + // and any extension field with the number will fail to compile. Set this + // when a declared extension field is deleted. + Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"` + // If true, indicates that the extension must be defined as repeated. + // Otherwise the extension must be defined as optional. + Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` +} + +func (x *ExtensionRangeOptions_Declaration) Reset() { + *x = ExtensionRangeOptions_Declaration{} + if protoimpl.UnsafeEnabled { + mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtensionRangeOptions_Declaration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtensionRangeOptions_Declaration) ProtoMessage() {} + +func (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtensionRangeOptions_Declaration.ProtoReflect.Descriptor instead. +func (*ExtensionRangeOptions_Declaration) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ExtensionRangeOptions_Declaration) GetNumber() int32 { + if x != nil && x.Number != nil { + return *x.Number + } + return 0 +} + +func (x *ExtensionRangeOptions_Declaration) GetFullName() string { + if x != nil && x.FullName != nil { + return *x.FullName + } + return "" +} + +func (x *ExtensionRangeOptions_Declaration) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +func (x *ExtensionRangeOptions_Declaration) GetReserved() bool { + if x != nil && x.Reserved != nil { + return *x.Reserved + } + return false +} + +func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool { + if x != nil && x.Repeated != nil { + return *x.Repeated + } + return false +} + // Range of reserved numeric values. Reserved values may not be used by // entries in the same enum. Reserved ranges may not overlap. // @@ -2669,7 +3878,7 @@ type EnumDescriptorProto_EnumReservedRange struct { func (x *EnumDescriptorProto_EnumReservedRange) Reset() { *x = EnumDescriptorProto_EnumReservedRange{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[23] + mi := &file_google_protobuf_descriptor_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2682,7 +3891,7 @@ func (x *EnumDescriptorProto_EnumReservedRange) String() string { func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[23] + mi := &file_google_protobuf_descriptor_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2712,11 +3921,66 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { return 0 } +type FieldOptions_EditionDefault struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. +} + +func (x *FieldOptions_EditionDefault) Reset() { + *x = FieldOptions_EditionDefault{} + if protoimpl.UnsafeEnabled { + mi := &file_google_protobuf_descriptor_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldOptions_EditionDefault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOptions_EditionDefault) ProtoMessage() {} + +func (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOptions_EditionDefault.ProtoReflect.Descriptor instead. +func (*FieldOptions_EditionDefault) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *FieldOptions_EditionDefault) GetEdition() Edition { + if x != nil && x.Edition != nil { + return *x.Edition + } + return Edition_EDITION_UNKNOWN +} + +func (x *FieldOptions_EditionDefault) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents -// "foo.(bar.baz).qux". +// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents +// "foo.(bar.baz).moo". type UninterpretedOption_NamePart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2729,7 +3993,7 @@ type UninterpretedOption_NamePart struct { func (x *UninterpretedOption_NamePart) Reset() { *x = UninterpretedOption_NamePart{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[24] + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2742,7 +4006,7 @@ func (x *UninterpretedOption_NamePart) String() string { func (*UninterpretedOption_NamePart) ProtoMessage() {} func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[24] + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2772,6 +4036,65 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool { return false } +// A map from every known edition with a unique set of defaults to its +// defaults. Not all editions may be contained here. For a given edition, +// the defaults at the closest matching edition ordered at or before it should +// be used. This field must be in strict ascending order by edition. +type FeatureSetDefaults_FeatureSetEditionDefault struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { + *x = FeatureSetDefaults_FeatureSetEditionDefault{} + if protoimpl.UnsafeEnabled { + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureSetDefaults_FeatureSetEditionDefault.ProtoReflect.Descriptor instead. +func (*FeatureSetDefaults_FeatureSetEditionDefault) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0} +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition { + if x != nil && x.Edition != nil { + return *x.Edition + } + return Edition_EDITION_UNKNOWN +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + type SourceCodeInfo_Location struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2781,23 +4104,34 @@ type SourceCodeInfo_Location struct { // location. // // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] + // the root FileDescriptorProto to the place where the definition occurs. + // For example, this path: + // + // [ 4, 3, 2, 7, 1 ] + // // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 + // + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; + // + // repeated DescriptorProto message_type = 4; + // // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; + // + // repeated FieldDescriptorProto field = 2; + // // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; + // + // optional string name = 1; // // Thus, the above path gives the location of a field name. If we removed // the last element: - // [ 4, 3, 2, 7 ] + // + // [ 4, 3, 2, 7 ] + // // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` @@ -2826,34 +4160,34 @@ type SourceCodeInfo_Location struct { // // Examples: // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; + // // Comment attached to moo. + // // + // // Another line attached to moo. + // optional double moo = 4; // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. + // // Detached comment for corge. This is not leading or trailing comments + // // to moo or corge because there are blank lines separating it from + // // both. // - // // Detached comment for corge paragraph 2. + // // Detached comment for corge paragraph 2. // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; // - // // ignored detached comments. + // // ignored detached comments. LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` @@ -2862,7 +4196,7 @@ type SourceCodeInfo_Location struct { func (x *SourceCodeInfo_Location) Reset() { *x = SourceCodeInfo_Location{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2875,7 +4209,7 @@ func (x *SourceCodeInfo_Location) String() string { func (*SourceCodeInfo_Location) ProtoMessage() {} func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2888,7 +4222,7 @@ func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { // Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Descriptor instead. func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0} + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21, 0} } func (x *SourceCodeInfo_Location) GetPath() []int32 { @@ -2940,15 +4274,16 @@ type GeneratedCodeInfo_Annotation struct { // that relates to the identified object. Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past + // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` } func (x *GeneratedCodeInfo_Annotation) Reset() { *x = GeneratedCodeInfo_Annotation{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[26] + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2961,7 +4296,7 @@ func (x *GeneratedCodeInfo_Annotation) String() string { func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[26] + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2974,7 +4309,7 @@ func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { // Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead. func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { - return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0} + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0} } func (x *GeneratedCodeInfo_Annotation) GetPath() []int32 { @@ -3005,6 +4340,13 @@ func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 { return 0 } +func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotation_Semantic { + if x != nil && x.Semantic != nil { + return *x.Semantic + } + return GeneratedCodeInfo_Annotation_NONE +} + var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor var file_google_protobuf_descriptor_proto_rawDesc = []byte{ @@ -3016,7 +4358,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0xe4, 0x04, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -3054,66 +4396,98 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x22, 0xb9, 0x06, 0x0a, 0x0f, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x43, - 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, - 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63, - 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, + 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, 0x0a, 0x0d, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x7c, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, + 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, + 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, + 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xc7, 0x04, 0x0a, 0x15, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, + 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, + 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x68, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x52, 0x0c, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, 0x01, 0x0a, 0x0b, + 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x4e, 0x56, 0x45, + 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, @@ -3164,9 +4538,9 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, - 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, - 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, + 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, @@ -3230,7 +4604,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x91, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0xca, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, @@ -3293,197 +4667,416 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, - 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, - 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, - 0x10, 0x27, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, - 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, - 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, - 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, - 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, - 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, - 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, - 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, - 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, - 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, - 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, - 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, - 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, - 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, - 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f, - 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, - 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, - 0x05, 0x10, 0x06, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, + 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, + 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, + 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, + 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, + 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, 0x0a, 0x0e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, + 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, + 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, + 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, + 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, + 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, - 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xe0, 0x02, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, + 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, + 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, + 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, + 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, + 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, + 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, + 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, + 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, + 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, + 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, + 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2f, 0x0a, + 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, + 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, + 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, + 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, + 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, + 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, + 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, + 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, + 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, + 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, + 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, + 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, + 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, + 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, + 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, + 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, - 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, - 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, + 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, + 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, + 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, + 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, + 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, + 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, + 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, + 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, + 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfc, 0x09, 0x0a, 0x0a, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x39, 0x88, + 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, + 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, + 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, + 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, 0x12, 0x06, + 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4f, 0x50, + 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, + 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, + 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, 0x15, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, + 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, 0x07, + 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0x52, 0x0e, + 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, + 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, + 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, + 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, + 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, + 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, + 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x02, 0x12, + 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, + 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, 0x56, 0x0a, + 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, + 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, + 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, 0x38, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x02, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, + 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, + 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, + 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, + 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, + 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, + 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9, + 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, + 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, + 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, + 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, - 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, - 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, - 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, - 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, - 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, - 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd1, 0x01, - 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, - 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, - 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, - 0x64, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, - 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, + 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, + 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, + 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xea, 0x01, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, + 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, + 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, + 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, + 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, + 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x9f, 0x8d, 0x06, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, + 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, + 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, } var ( @@ -3498,92 +5091,136 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { return file_google_protobuf_descriptor_proto_rawDescData } -var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) +var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ - (FieldDescriptorProto_Type)(0), // 0: google.protobuf.FieldDescriptorProto.Type - (FieldDescriptorProto_Label)(0), // 1: google.protobuf.FieldDescriptorProto.Label - (FileOptions_OptimizeMode)(0), // 2: google.protobuf.FileOptions.OptimizeMode - (FieldOptions_CType)(0), // 3: google.protobuf.FieldOptions.CType - (FieldOptions_JSType)(0), // 4: google.protobuf.FieldOptions.JSType - (MethodOptions_IdempotencyLevel)(0), // 5: google.protobuf.MethodOptions.IdempotencyLevel - (*FileDescriptorSet)(nil), // 6: google.protobuf.FileDescriptorSet - (*FileDescriptorProto)(nil), // 7: google.protobuf.FileDescriptorProto - (*DescriptorProto)(nil), // 8: google.protobuf.DescriptorProto - (*ExtensionRangeOptions)(nil), // 9: google.protobuf.ExtensionRangeOptions - (*FieldDescriptorProto)(nil), // 10: google.protobuf.FieldDescriptorProto - (*OneofDescriptorProto)(nil), // 11: google.protobuf.OneofDescriptorProto - (*EnumDescriptorProto)(nil), // 12: google.protobuf.EnumDescriptorProto - (*EnumValueDescriptorProto)(nil), // 13: google.protobuf.EnumValueDescriptorProto - (*ServiceDescriptorProto)(nil), // 14: google.protobuf.ServiceDescriptorProto - (*MethodDescriptorProto)(nil), // 15: google.protobuf.MethodDescriptorProto - (*FileOptions)(nil), // 16: google.protobuf.FileOptions - (*MessageOptions)(nil), // 17: google.protobuf.MessageOptions - (*FieldOptions)(nil), // 18: google.protobuf.FieldOptions - (*OneofOptions)(nil), // 19: google.protobuf.OneofOptions - (*EnumOptions)(nil), // 20: google.protobuf.EnumOptions - (*EnumValueOptions)(nil), // 21: google.protobuf.EnumValueOptions - (*ServiceOptions)(nil), // 22: google.protobuf.ServiceOptions - (*MethodOptions)(nil), // 23: google.protobuf.MethodOptions - (*UninterpretedOption)(nil), // 24: google.protobuf.UninterpretedOption - (*SourceCodeInfo)(nil), // 25: google.protobuf.SourceCodeInfo - (*GeneratedCodeInfo)(nil), // 26: google.protobuf.GeneratedCodeInfo - (*DescriptorProto_ExtensionRange)(nil), // 27: google.protobuf.DescriptorProto.ExtensionRange - (*DescriptorProto_ReservedRange)(nil), // 28: google.protobuf.DescriptorProto.ReservedRange - (*EnumDescriptorProto_EnumReservedRange)(nil), // 29: google.protobuf.EnumDescriptorProto.EnumReservedRange - (*UninterpretedOption_NamePart)(nil), // 30: google.protobuf.UninterpretedOption.NamePart - (*SourceCodeInfo_Location)(nil), // 31: google.protobuf.SourceCodeInfo.Location - (*GeneratedCodeInfo_Annotation)(nil), // 32: google.protobuf.GeneratedCodeInfo.Annotation + (Edition)(0), // 0: google.protobuf.Edition + (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState + (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type + (FieldDescriptorProto_Label)(0), // 3: google.protobuf.FieldDescriptorProto.Label + (FileOptions_OptimizeMode)(0), // 4: google.protobuf.FileOptions.OptimizeMode + (FieldOptions_CType)(0), // 5: google.protobuf.FieldOptions.CType + (FieldOptions_JSType)(0), // 6: google.protobuf.FieldOptions.JSType + (FieldOptions_OptionRetention)(0), // 7: google.protobuf.FieldOptions.OptionRetention + (FieldOptions_OptionTargetType)(0), // 8: google.protobuf.FieldOptions.OptionTargetType + (MethodOptions_IdempotencyLevel)(0), // 9: google.protobuf.MethodOptions.IdempotencyLevel + (FeatureSet_FieldPresence)(0), // 10: google.protobuf.FeatureSet.FieldPresence + (FeatureSet_EnumType)(0), // 11: google.protobuf.FeatureSet.EnumType + (FeatureSet_RepeatedFieldEncoding)(0), // 12: google.protobuf.FeatureSet.RepeatedFieldEncoding + (FeatureSet_Utf8Validation)(0), // 13: google.protobuf.FeatureSet.Utf8Validation + (FeatureSet_MessageEncoding)(0), // 14: google.protobuf.FeatureSet.MessageEncoding + (FeatureSet_JsonFormat)(0), // 15: google.protobuf.FeatureSet.JsonFormat + (GeneratedCodeInfo_Annotation_Semantic)(0), // 16: google.protobuf.GeneratedCodeInfo.Annotation.Semantic + (*FileDescriptorSet)(nil), // 17: google.protobuf.FileDescriptorSet + (*FileDescriptorProto)(nil), // 18: google.protobuf.FileDescriptorProto + (*DescriptorProto)(nil), // 19: google.protobuf.DescriptorProto + (*ExtensionRangeOptions)(nil), // 20: google.protobuf.ExtensionRangeOptions + (*FieldDescriptorProto)(nil), // 21: google.protobuf.FieldDescriptorProto + (*OneofDescriptorProto)(nil), // 22: google.protobuf.OneofDescriptorProto + (*EnumDescriptorProto)(nil), // 23: google.protobuf.EnumDescriptorProto + (*EnumValueDescriptorProto)(nil), // 24: google.protobuf.EnumValueDescriptorProto + (*ServiceDescriptorProto)(nil), // 25: google.protobuf.ServiceDescriptorProto + (*MethodDescriptorProto)(nil), // 26: google.protobuf.MethodDescriptorProto + (*FileOptions)(nil), // 27: google.protobuf.FileOptions + (*MessageOptions)(nil), // 28: google.protobuf.MessageOptions + (*FieldOptions)(nil), // 29: google.protobuf.FieldOptions + (*OneofOptions)(nil), // 30: google.protobuf.OneofOptions + (*EnumOptions)(nil), // 31: google.protobuf.EnumOptions + (*EnumValueOptions)(nil), // 32: google.protobuf.EnumValueOptions + (*ServiceOptions)(nil), // 33: google.protobuf.ServiceOptions + (*MethodOptions)(nil), // 34: google.protobuf.MethodOptions + (*UninterpretedOption)(nil), // 35: google.protobuf.UninterpretedOption + (*FeatureSet)(nil), // 36: google.protobuf.FeatureSet + (*FeatureSetDefaults)(nil), // 37: google.protobuf.FeatureSetDefaults + (*SourceCodeInfo)(nil), // 38: google.protobuf.SourceCodeInfo + (*GeneratedCodeInfo)(nil), // 39: google.protobuf.GeneratedCodeInfo + (*DescriptorProto_ExtensionRange)(nil), // 40: google.protobuf.DescriptorProto.ExtensionRange + (*DescriptorProto_ReservedRange)(nil), // 41: google.protobuf.DescriptorProto.ReservedRange + (*ExtensionRangeOptions_Declaration)(nil), // 42: google.protobuf.ExtensionRangeOptions.Declaration + (*EnumDescriptorProto_EnumReservedRange)(nil), // 43: google.protobuf.EnumDescriptorProto.EnumReservedRange + (*FieldOptions_EditionDefault)(nil), // 44: google.protobuf.FieldOptions.EditionDefault + (*UninterpretedOption_NamePart)(nil), // 45: google.protobuf.UninterpretedOption.NamePart + (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 46: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + (*SourceCodeInfo_Location)(nil), // 47: google.protobuf.SourceCodeInfo.Location + (*GeneratedCodeInfo_Annotation)(nil), // 48: google.protobuf.GeneratedCodeInfo.Annotation } var file_google_protobuf_descriptor_proto_depIdxs = []int32{ - 7, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto - 8, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto - 12, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto - 14, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto - 10, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto - 16, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions - 25, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo - 10, // 7: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto - 10, // 8: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto - 8, // 9: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto - 12, // 10: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto - 27, // 11: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange - 11, // 12: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto - 17, // 13: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions - 28, // 14: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange - 24, // 15: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 1, // 16: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label - 0, // 17: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type - 18, // 18: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions - 19, // 19: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions - 13, // 20: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto - 20, // 21: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions - 29, // 22: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange - 21, // 23: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions - 15, // 24: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto - 22, // 25: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions - 23, // 26: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions - 2, // 27: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode - 24, // 28: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 29: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 3, // 30: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType - 4, // 31: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType - 24, // 32: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 33: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 34: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 35: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 36: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 5, // 37: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel - 24, // 38: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 30, // 39: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart - 31, // 40: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location - 32, // 41: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation - 9, // 42: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions - 43, // [43:43] is the sub-list for method output_type - 43, // [43:43] is the sub-list for method input_type - 43, // [43:43] is the sub-list for extension type_name - 43, // [43:43] is the sub-list for extension extendee - 0, // [0:43] is the sub-list for field type_name + 18, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto + 19, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto + 23, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto + 25, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto + 21, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto + 27, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions + 38, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo + 0, // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition + 21, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto + 21, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto + 19, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto + 23, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto + 40, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange + 22, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto + 28, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions + 41, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange + 35, // 16: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 42, // 17: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration + 36, // 18: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet + 1, // 19: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState + 3, // 20: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label + 2, // 21: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type + 29, // 22: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions + 30, // 23: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions + 24, // 24: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto + 31, // 25: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions + 43, // 26: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange + 32, // 27: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions + 26, // 28: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto + 33, // 29: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions + 34, // 30: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions + 4, // 31: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode + 36, // 32: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 33: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 34: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 35: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 5, // 36: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType + 6, // 37: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType + 7, // 38: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention + 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType + 44, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault + 36, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 42: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 43: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 44: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 45: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 46: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 47: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 48: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 49: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 50: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 9, // 51: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel + 36, // 52: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 53: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 45, // 54: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart + 10, // 55: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence + 11, // 56: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType + 12, // 57: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding + 13, // 58: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation + 14, // 59: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding + 15, // 60: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat + 46, // 61: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + 0, // 62: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition + 0, // 63: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition + 47, // 64: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location + 48, // 65: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation + 20, // 66: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions + 0, // 67: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition + 0, // 68: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition + 36, // 69: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features:type_name -> google.protobuf.FeatureSet + 16, // 70: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic + 71, // [71:71] is the sub-list for method output_type + 71, // [71:71] is the sub-list for method input_type + 71, // [71:71] is the sub-list for extension type_name + 71, // [71:71] is the sub-list for extension extendee + 0, // [0:71] is the sub-list for field type_name } func init() { file_google_protobuf_descriptor_proto_init() } @@ -3839,19 +5476,21 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceCodeInfo); i { + switch v := v.(*FeatureSet); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields + case 3: + return &v.extensionFields default: return nil } } file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GeneratedCodeInfo); i { + switch v := v.(*FeatureSetDefaults); i { case 0: return &v.state case 1: @@ -3863,7 +5502,7 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DescriptorProto_ExtensionRange); i { + switch v := v.(*SourceCodeInfo); i { case 0: return &v.state case 1: @@ -3875,7 +5514,7 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DescriptorProto_ReservedRange); i { + switch v := v.(*GeneratedCodeInfo); i { case 0: return &v.state case 1: @@ -3887,7 +5526,7 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { + switch v := v.(*DescriptorProto_ExtensionRange); i { case 0: return &v.state case 1: @@ -3899,7 +5538,7 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UninterpretedOption_NamePart); i { + switch v := v.(*DescriptorProto_ReservedRange); i { case 0: return &v.state case 1: @@ -3911,7 +5550,7 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceCodeInfo_Location); i { + switch v := v.(*ExtensionRangeOptions_Declaration); i { case 0: return &v.state case 1: @@ -3923,6 +5562,66 @@ func file_google_protobuf_descriptor_proto_init() { } } file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldOptions_EditionDefault); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UninterpretedOption_NamePart); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceCodeInfo_Location); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GeneratedCodeInfo_Annotation); i { case 0: return &v.state @@ -3940,8 +5639,8 @@ func file_google_protobuf_descriptor_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, - NumEnums: 6, - NumMessages: 27, + NumEnums: 17, + NumMessages: 32, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/modules.txt b/vendor/modules.txt index d75e1511..61c41588 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 +# github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 ## explicit; go 1.16 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm @@ -24,7 +24,7 @@ github.com/docker/machine/version # github.com/golang/mock v1.6.0 ## explicit; go 1.11 github.com/golang/mock/gomock -# github.com/golang/protobuf v1.5.2 +# github.com/golang/protobuf v1.5.3 ## explicit; go 1.9 github.com/golang/protobuf/proto # github.com/hashicorp/errwrap v1.1.0 @@ -33,30 +33,30 @@ github.com/hashicorp/errwrap # github.com/hashicorp/go-multierror v1.1.1 ## explicit; go 1.13 github.com/hashicorp/go-multierror -# github.com/ionos-cloud/sdk-go/v6 v6.1.3 -## explicit; go 1.17 +# github.com/ionos-cloud/sdk-go/v6 v6.1.11 +## explicit; go 1.19 github.com/ionos-cloud/sdk-go/v6 -# github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c +# github.com/moby/term v0.5.0 ## explicit; go 1.18 github.com/moby/term github.com/moby/term/windows # github.com/pmezard/go-difflib v1.0.0 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/stretchr/testify v1.8.1 -## explicit; go 1.13 +# github.com/stretchr/testify v1.9.0 +## explicit; go 1.17 github.com/stretchr/testify/assert -# github.com/tidwall/gjson v1.14.4 +# github.com/tidwall/gjson v1.17.1 ## explicit; go 1.12 github.com/tidwall/gjson # github.com/tidwall/match v1.1.1 ## explicit; go 1.15 github.com/tidwall/match -# github.com/tidwall/pretty v1.2.0 +# github.com/tidwall/pretty v1.2.1 ## explicit; go 1.16 github.com/tidwall/pretty -# golang.org/x/crypto v0.14.0 -## explicit; go 1.17 +# golang.org/x/crypto v0.20.0 +## explicit; go 1.18 golang.org/x/crypto/blowfish golang.org/x/crypto/chacha20 golang.org/x/crypto/curve25519 @@ -66,27 +66,20 @@ golang.org/x/crypto/internal/poly1305 golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/crypto/ssh/terminal -# golang.org/x/exp v0.0.0-20230118134722-a68e582fa157 +# golang.org/x/oauth2 v0.17.0 ## explicit; go 1.18 -golang.org/x/exp/maps -# golang.org/x/net v0.17.0 -## explicit; go 1.17 -golang.org/x/net/context -golang.org/x/net/context/ctxhttp -# golang.org/x/oauth2 v0.2.0 -## explicit; go 1.17 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sys v0.13.0 -## explicit; go 1.17 +# golang.org/x/sys v0.17.0 +## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.13.0 -## explicit; go 1.17 +# golang.org/x/term v0.17.0 +## explicit; go 1.18 golang.org/x/term -# google.golang.org/appengine v1.6.7 +# google.golang.org/appengine v1.6.8 ## explicit; go 1.11 google.golang.org/appengine/internal google.golang.org/appengine/internal/base @@ -95,8 +88,8 @@ google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/protobuf v1.28.1 -## explicit; go 1.11 +# google.golang.org/protobuf v1.32.0 +## explicit; go 1.17 google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/internal/descfmt